• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






无语_

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理
上一页 1 2

2013年5月24日

UIActionSheet 用法
摘要: UIActionSheet* _sheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:ContactTel, nil]; [_sheet showInView:self.view];#pragma mark ActionSheetDelegate-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonA 阅读全文
posted @ 2013-05-24 16:15 无语_ 阅读(150) 评论(0) 推荐(0)
 
ios 程序内部调用打电话功能
摘要: UIWebView* callWebview =[[UIWebView alloc] init]; NSURL *telURL =[NSURL URLWithString:[NSString stringWithFormat:@"tel://%@", ContactTel]]; [callWebview loadRequest:[NSURLRequest requestWithURL:telURL]]; [self.view addSubview:callWebview]; [callWebview release];调用些方法,打完电话... 阅读全文
posted @ 2013-05-24 16:14 无语_ 阅读(200) 评论(0) 推荐(0)
 

2013年4月25日

ios6.0不在支持udid,使用新的 identifier vendor
摘要: [[[UIDevicecurrentDevice] identifierForVendor] UUIDString] 阅读全文
posted @ 2013-04-25 09:04 无语_ 阅读(137) 评论(0) 推荐(0)
 

2012年10月25日

UIAlertView会出现丢失控制器的问题
摘要: 在使用第三方软件比如facebook和weibo时,需要通过UIAlertView的delegate方法打开,如果此时使用的是-(void)alertView:(UIAlertView*)alertView clickedButtonAtIndex:(NSInteger)buttonIndex 就会造成一打开弹框,马上就被关闭了。需要改成此方delegate方法 就不会出现问题了。-(void)alertView:(UIAlertView*)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex 阅读全文
posted @ 2012-10-25 15:11 无语_ 阅读(136) 评论(0) 推荐(0)
 

2012年9月4日

ios-dealloc
摘要: 1.对象如果不存在了,请将指针置空,养成良好的内存控制习惯。2.[super dealloc];要在dealloc函数的最后调用(类似于C++的析构函数),这样就可以在自身被销毁之前再次调用自身的函数。3.对于某些已经使用(alloc,copy和retain)分配内存的对象,可以直接release,对于可能出现分配内存的对象需要做一次判断再去release(比如点击事件响应的)。4.不用去依靠retainCount输出来判断内存计数器,apple官方文档都申明过可能有误显示5.在调试模式下可能没有的内存问题会在运行模式下出现,这个时候就要根据经验来判断了,比如首先应该想到的就是dealloc函 阅读全文
posted @ 2012-09-04 15:52 无语_ 阅读(1152) 评论(0) 推荐(0)
 
ios-release理解
摘要: @interface classA:NSObject{}@property (nonatomic,retain) UIImageView* imageView;@end@implementation classA@synthesize imageView;-(void)init{ //方法1:使用了get和set方法,但是在实例的时候没有通过self调用,则只增加一次保留记数 imageView = [[UIImageView alloc] init]; NSLog(@"count=%d",[str retainCount]);//count=1 [self addSu.. 阅读全文
posted @ 2012-09-04 15:42 无语_ 阅读(329) 评论(0) 推荐(0)
 

2012年9月3日

ios - tag的使用
摘要: UIButton* buttonByTag = (UIButton*)[self viewWithTag:100]; //通过tag获得相应的uibutton if( buttonByTag != nil ) [buttonByTag removeFromSuperview];//如果button不为空,则清除之前的显示//初始化button UIButton* button = [UIButton buttonWithType:UIButtonTypeCustom]; button.tag = 100; UIIm... 阅读全文
posted @ 2012-09-03 17:13 无语_ 阅读(639) 评论(0) 推荐(0)
 

2012年8月23日

NSUserDefaults
摘要: 新版本xocde,不可以获得设备的udid。以下是替待udid的方法:NSString* string = [[NSUserDefaults standardUserDefaults] stringForKey:@"deviceId"]; if( [string isEqual:@""]|| string==nil ) { CFUUIDRef deviceId = CFUUIDCreate (NULL); CFStringRef deviceIdStringRef = CFUUIDCreateString(NULL,deviceId); CFReleas 阅读全文
posted @ 2012-08-23 12:38 无语_ 阅读(205) 评论(0) 推荐(0)
 
上一页 1 2