2015年12月16日

摘要: #import @interface Student : NSObject ;@property(nonatomic,strong)NSString* name;@property(nonatomic,assign)int age;@property(nonatomic,copy)NSString*... 阅读全文
posted @ 2015-12-16 10:23 摩羯小伟 阅读(155) 评论(0) 推荐(0) 编辑
摘要: #import #import @interface DBConnect : NSObject@property(nonatomic,copy)NSString* title;+(sqlite3*)openDataBase:(NSString*)title;+(void)closeDataBase;... 阅读全文
posted @ 2015-12-16 10:18 摩羯小伟 阅读(168) 评论(0) 推荐(0) 编辑

2015年12月15日

摘要: //_tableView 这个太简单需要的代码篇幅有点多,自己去定义,//设置全局变量 UIRefreshControl* refres;//下拉刷新 refres=[[UIRefreshControl alloc]init]; refres.attributedTitle=[[NSAt... 阅读全文
posted @ 2015-12-15 11:08 摩羯小伟 阅读(429) 评论(0) 推荐(0) 编辑

2015年12月11日

摘要: 1 #import "ViewController.h" 2 3 #define Width self.view.frame.size.width 4 #define Height self.view.frame.size.height 5 #define viewH 200 6 @inter... 阅读全文
posted @ 2015-12-11 16:34 摩羯小伟 阅读(2032) 评论(0) 推荐(0) 编辑

2015年11月25日

摘要: 多用于tableView的选中 UIViewController* XXX=[[NSClassFromString([_viewControllerArray objectAtIndex:indexPath.row]) alloc] init]; 代码块里面需要些self的话就在外面声明__unsa 阅读全文
posted @ 2015-11-25 21:15 摩羯小伟 阅读(263) 评论(0) 推荐(0) 编辑

2015年11月17日

摘要: NSString* string=@"资源地址";//比如图片资源 NSURL* url=[[NSURL alloc ]initWithString:string]; NSURLRequest* request=[[NSURLRequest alloc]initWithURL:url]; [NSUR 阅读全文
posted @ 2015-11-17 15:35 摩羯小伟 阅读(212) 评论(0) 推荐(0) 编辑

2015年10月8日

摘要: AppDelegate.m文件中#import"ViewController.h"- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions ... 阅读全文
posted @ 2015-10-08 19:14 摩羯小伟 阅读(295) 评论(0) 推荐(0) 编辑

2015年10月6日

摘要: 1 - (void)viewDidLoad 2 { 3 [super viewDidLoad]; 4 arr=[[NSMutableArray alloc]initWithCapacity:16]; 5 6 for (int i=0; i=4) {40 bt... 阅读全文
posted @ 2015-10-06 15:33 摩羯小伟 阅读(173) 评论(0) 推荐(0) 编辑

2015年9月29日

摘要: UITextField* textField=[[UITextField alloc]initWithFrame:CGRectMake(60, 100, 200, 30)]; //属性 //样式 textField.borderStyle=UITextBorderStyleBe... 阅读全文
posted @ 2015-09-29 20:42 摩羯小伟 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 创建一个以OC为开发语言的IOS工程,新建一个类继承与UIView重写一下方法并实现//在.h文件里面声明两个实例变量{ CGPoint _startpoint;//记录点击滑动时的位置 NSMutableArray* _marray;//记录滑动时的位置 }//在.m文件里面//... 阅读全文
posted @ 2015-09-29 19:35 摩羯小伟 阅读(208) 评论(0) 推荐(0) 编辑

导航