摘要: 1 一、ASI类库集成: 2 1.添加源代码文件 3 ASIAuthenticationDialog.h 4 ASIAuthenticationDialog.m 5 ASICacheDelegate.h 6 ASIDataCompressor.h 7 ASIDataCompressor.m 8 ASIDataDecompressor.h 9 ASIDataDecompressor.m10 ASIDownloadCache.h11 ASIDownloadCache.m12 ASIFormDataRequest.h13 ASIFormDataRequest.m14 ASIHTTPRequest.. 阅读全文
posted @ 2013-08-02 18:32 wangzhenxiang 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 1 //当前视图的父视图添加和本视图同级的视图2 [self.view.superview addSubview:showview.view];3 //从父视图移除当前视图4 [self.view removeFromSuperview]; 阅读全文
posted @ 2013-08-02 16:52 wangzhenxiang 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 1 #pragma mark 快速创建一个item 2 - (UIBarButtonItem *)itemWithNormal:(NSString *)normal highlighted:(NSString *)highlighted selector:(SEL)selector { 3 // 初始化按钮 4 UIButton *button = [[[UIButton alloc] init] autorelease]; 5 button.title.font = [UIFont systemFontOfSize:10]; 6 // 设置按钮背景图片 7... 阅读全文
posted @ 2013-08-02 11:29 wangzhenxiang 阅读(4100) 评论(0) 推荐(0) 编辑
摘要: 1 CGSize height = self.view.bounds.size.height; 2 CGSize width = self.view.bounds.size.width; 3 CGFloat height = self.bounds.size.height; 4 CGFloat weight = self.bounds.size.width; 5 6 // 设置文字居中 7 self.titleLabel.textAlignment = NSTextAlignmentCenter; 8 // 设置字体大小 9 self.titleLabel.font = [UIFont s.. 阅读全文
posted @ 2013-08-02 10:57 wangzhenxiang 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 1 //主屏幕设为webView2 CGRect frame = [UIScreen mainScreen].applicationFrame;3 UIWebView *webView = [[[UIWebView alloc] initWithFrame:frame] autorelease];4 self.view = webView;1 UIApplication *app = [UIApplication sharedApplication];2 // 显示状态栏3 app.statusBarHidden = NO;4 ChangeController *index = [[Chan. 阅读全文
posted @ 2013-08-02 01:59 wangzhenxiang 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 1 id key = (id)kCFBundleVersionKey; 2 // 检测是否第一次使用这个版本 info.plist 3 NSDictionary *info = [NSBundle mainBundle].infoDictionary; 4 NSString *currentVersion = [info objectForKey:key]; 5 6 // NSLog(@"%@", currentVersion); 7 8 // 从沙盒中取出版本号 9 NSUserDefaults *defaults =[N... 阅读全文
posted @ 2013-08-02 00:59 wangzhenxiang 阅读(185) 评论(0) 推荐(0) 编辑