字符串操作:

http://www.myexception.cn/mobile/455287.html

1,判断两字符串是否相同

NSString *str1 = @"hello pepe";   
NSString *str2=[NSString stringWithFormat:@"hello %s","pepe"];
if([str1 isEqualToString:str2]){
NSLog(@"相同");
}
else{
NSLog(@"不同");
}

2,浮点型运算

  CGRect screenRect=[UIScreenmainScreen].bounds;

CGFloat widthf= (screenRect.size.height-self.adView.frame.size.width)/2;

CGFloat heighf=screenRect.size.width-self.adView.frame.size.height-50.0f;

相关文章:

  • 2022-12-23
  • 2021-08-31
  • 2021-12-20
  • 2021-11-30
  • 2021-12-19
  • 2021-09-18
  • 2022-01-02
  • 2022-12-23
猜你喜欢
  • 2021-12-09
  • 2022-12-23
  • 2022-01-11
  • 2022-12-23
  • 2021-10-22
  • 2022-12-23
  • 2021-08-21
相关资源
相似解决方案