最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
手机开发之xcode 开发快速小手册
时间:2014-10-18 编辑:简简单单 来源:一聚教程网
知识库
加载一张图片
UIImageView *imageView =[[UIImageView alloc]initWithFrame:CGRectMake(100, 100, 200, 200)];
imageView.image=[UIImage imageNamed:@"22.png"];
[self.view addSubview:imageView];
弹出窗口
NSString *msg = @”f*au*ck U”;
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@”message” message:msg delegate:self cancelButtonTitle:@”No” otherButtonTitles:@”Yes”, nil]; [alert show];
集成一个弹窗方法
NSString *a = [NSString stringWithFormat:@"group s %d",index];
[self alert:a];
字符串数字转换
1,字符串拼接
NSString *newString = [NSString stringWithFormat:@"%@%@",tempA,tempB];
2,字符转int
int intString = [newString intValue];
3,int转字符
NSString *stringInt = [NSString stringWithFormat:@"%d",intString];
解决中文乱码问题,POST也可以用,textfield也可以用的。
[NSString stringWithCString:[str UTF8String] encoding:NSUTF8StringEncoding];
相关文章
- 真我手机怎么开启私密相册 真我手机开启私密相册方法 03-13
- 手机自动跳屏怎么办 手机自动跳屏解决方法 06-09
- 手机熄屏怎么发送求救信号 手机息屏状态下发送求救信息的方法 08-29
- 手机锁屏密码忘了怎么解决 手机锁屏密码忘了解决方法 08-05
- 荣耀畅玩手环A1(AW600)睡眠监测怎么用? 05-03
- 如何用手机订购机票 使用手机订购机票的方法 05-02