java多线程    Java入门    vsftp    ftp    linux配置    centos    FRP教程    HBase    Html5缓存    webp    zabbix    分布式    neo4j图数据库    

xcode 开发快速小手册

知识库

加载一张图片

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];


This entry was posted in MAC and tagged , . Bookmark the permalink.
月小升QQ 2651044202, 技术交流QQ群 178491360
首发地址:月小升博客https://java-er.com/blog/xcode-speed-search/
无特殊说明,文章均为月小升原创,欢迎转载,转载请注明本文地址,谢谢
您的评论是我写作的动力.

Leave a Reply