码迷,mamicode.com
首页 >  
搜索关键字:nslog    ( 1220个结果
OC语言中字符串的使用
可变字符串//插入字符串NSMutableString*string1=[NSMutableStringstringWithString:@"字符串"];[string1insertString:@"可变"atIndex:0];//在string的第0个位置插入NSLog(@"string=%@",string1);//可变字符串//删除字符串NSMutableString*string2=[NSMutableStringstringWithS..
分类:编程语言   时间:2015-08-06 02:13:51    阅读次数:336
判断app是在前台还是后台
if(application.applicationState == UIApplicationStateActive) { NSLog(@"前台"); } if (application.applicationState == UIApplicationStateBackground) { NSLog(@"后台"); } i...
分类:移动开发   时间:2015-08-05 18:37:43    阅读次数:148
ios iphone6 Plus 的适配问题
最近更新一个老程序,发现在iphone6 plus上用nslog打印出的screen 的frame还是320*568, 不是414*736,查了一下,原来需要设置iphone6 plus的启动画面才行。。。。这和以前iphone4到iphone5的屏幕尺寸改变问题一样的,都需要启动画面。详细内容见以...
分类:移动开发   时间:2015-08-05 17:42:56    阅读次数:135
获取wifi列表
-(id)fetchSSIDInfo{NSArray*ifs=(__bridge_transferid)CNCopySupportedInterfaces();NSLog(@"Supportedinterfaces:%@",ifs);idinfo=nil;for(NSString*ifnaminif...
分类:其他好文   时间:2015-08-05 12:35:17    阅读次数:103
Block
1、声明block --- 类型void (^Block) ();2、调用block Block();3、回调block Block = ^(){ // code NSLog(@"block"); };
分类:其他好文   时间:2015-08-04 22:35:13    阅读次数:98
Xcode自定义字体不能应用的原因
想给UILabel换一个自定义的字体,从字体册选择兰亭黑:然后选择 在Finder中显示,找到字体文件为Lantinghei.ttc;将其拷贝到项目中,在info.plist里添加字体支持key,在其子项中输入字体文件名称:然后在第一时间修改Lable的字体:- (void)awakeFromNib { // Initialization code NSLog(@"%s enter!...
分类:其他好文   时间:2015-08-04 11:17:42    阅读次数:953
iOS项目中重定义NSLog方法
不解释。 #ifdef DEBUG // 调试状态, 打开LOG功能 #define MYLog(...) NSLog(__VA_ARGS__) #else // 发布状态, 关闭LOG功能 #define MYLog(...) #endif...
分类:移动开发   时间:2015-08-03 21:04:07    阅读次数:177
NSlog 对于新手的一点技巧和用法.
#ifdef DEBUG# define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);#else# define DLog(...)#en...
分类:其他好文   时间:2015-08-03 16:50:51    阅读次数:109
OC中NSString 的方法
NSString *str1 = @"BeiJing"; NSString *str2 = @"beijing"; //全部转为大写 NSLog(@"%@",[str1 uppercaseString]); //全部转为小写 NSLog(@"%@",[s...
分类:其他好文   时间:2015-08-03 13:05:07    阅读次数:124
打印NSLog分类 Foundation+Log.m
#import #import @implementation UIView(Log) + (NSString *)searchAllSubviews:(UIView *)superview {     NSMutableString *xml = [NSMutableString string];          NSString *class...
分类:其他好文   时间:2015-08-03 11:37:14    阅读次数:137
1220条   上一页 1 ... 64 65 66 67 68 ... 122 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!