摘要:
#import @interface Student : NSObject ;@property(nonatomic,strong)NSString* name;@property(nonatomic,assign)int age;@property(nonatomic,copy)NSString*... 阅读全文
摘要:
#import #import @interface DBConnect : NSObject@property(nonatomic,copy)NSString* title;+(sqlite3*)openDataBase:(NSString*)title;+(void)closeDataBase;... 阅读全文
摘要:
//_tableView 这个太简单需要的代码篇幅有点多,自己去定义,//设置全局变量 UIRefreshControl* refres;//下拉刷新 refres=[[UIRefreshControl alloc]init]; refres.attributedTitle=[[NSAt... 阅读全文
摘要:
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... 阅读全文
摘要:
多用于tableView的选中 UIViewController* XXX=[[NSClassFromString([_viewControllerArray objectAtIndex:indexPath.row]) alloc] init]; 代码块里面需要些self的话就在外面声明__unsa 阅读全文
摘要:
NSString* string=@"资源地址";//比如图片资源 NSURL* url=[[NSURL alloc ]initWithString:string]; NSURLRequest* request=[[NSURLRequest alloc]initWithURL:url]; [NSUR 阅读全文
摘要:
AppDelegate.m文件中#import"ViewController.h"- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions ... 阅读全文
摘要:
1 - (void)viewDidLoad 2 { 3 [super viewDidLoad]; 4 arr=[[NSMutableArray alloc]initWithCapacity:16]; 5 6 for (int i=0; i=4) {40 bt... 阅读全文
摘要:
UITextField* textField=[[UITextField alloc]initWithFrame:CGRectMake(60, 100, 200, 30)]; //属性 //样式 textField.borderStyle=UITextBorderStyleBe... 阅读全文
摘要:
创建一个以OC为开发语言的IOS工程,新建一个类继承与UIView重写一下方法并实现//在.h文件里面声明两个实例变量{ CGPoint _startpoint;//记录点击滑动时的位置 NSMutableArray* _marray;//记录滑动时的位置 }//在.m文件里面//... 阅读全文