// 一个按钮点击事件,判断点击按钮是那一个显示出他的信息- (IBAction)buttonPressed:(id)sender { if (sender == self.leftButton) { NSLog(@"%@", self.leftButton.currentTit...
分类:
其他好文 时间:
2014-07-16 18:19:06
阅读次数:
167
#ifndef __OPTIMIZE__#define NSLog(...) NSLog(__VA_ARGS__)#else#define NSLog(...){}#endif打开Xcode -->>product -->scheme -->>edit scheme -->info 设置debug ...
分类:
移动开发 时间:
2014-07-14 21:08:29
阅读次数:
262
获取屏幕尺寸[[[UIScreen mainScreen] currentMode].size.width];[[[UIScreen mainScreen] currentMode].size.height];也能够:NSLog(@"FrameHeight:%fFrameWidth:%f",self...
分类:
移动开发 时间:
2014-07-09 14:53:40
阅读次数:
213
-(NSArray *)getdataFromDatabase
{
NSString *path = [self getDBPath];
NSLog(@"path ==== %@",path);
NSLog(@"self.getDBPath == %@",[self getDBPath]);
FMDatabase *membersDB = [FMDatab...
分类:
其他好文 时间:
2014-07-08 13:07:44
阅读次数:
127
//_roaldSearchTextif([roadTitleLab.text rangeOfString:@"格力"].location !=NSNotFound) NSLog(@"yes");else NSLog(@"no");
分类:
移动开发 时间:
2014-07-06 21:52:19
阅读次数:
253
前提:在XCode做开发调试时往往需要打印一些调试信息做debug用,大家知道当打印信息的地方多了之后在模拟器上跑可能不会有什么问题,因为模拟器用的是电脑的硬件但是当应用跑在设备上时这些输出语句会在很大程度上影响应用的性能,针对这种问题可以写一些宏来控制这些调试信息的输出。在release版本禁止输...
分类:
其他好文 时间:
2014-07-06 20:21:12
阅读次数:
150
// First program example#import int main (int argc, const char * argv[]) { @autoreleasepool { NSLog (@"Programming is fun!"); } return...
分类:
其他好文 时间:
2014-07-06 13:03:34
阅读次数:
177
1、判断字符串是否包含某个字符
if( [str rangeOfString:@"hello"].location != NSNotFound) {
NSLog(@"yes");
} else {
NSLog(@...
分类:
移动开发 时间:
2014-07-06 11:18:41
阅读次数:
226
Obj-C只是增加了一点“特殊语料”的C语言,所以可以用printf()代替NSLog()。但我们建议使用NSLog,因为它添加了特性,例如时间戳,日期戳和自动附加换行符(‘\n’)等。1.OC的数组成员是任意的对象指针 与C中的链表结构类似(以nil结尾) 一切的数组操作不能越界OC的数组分为.....
分类:
其他好文 时间:
2014-07-05 22:33:03
阅读次数:
341
iOS开发中常用的数学函数 /*---- 常用数学公式 ----*/ //指数运算 3^2 3^3 NSLog(@"结果 %.f", pow(3,2)); //result 9 NSLog(@"结果 %.f", pow(3,3)); ...
分类:
移动开发 时间:
2014-07-05 22:01:45
阅读次数:
390