#import "RootTableViewController.h"@interface RootTableViewController (){ UITableViewCellEditingStyle _style;}@property(nonatomic,strong)NSMutableArr....
分类:
移动开发 时间:
2014-11-08 15:05:44
阅读次数:
179
TabbarButton.h@interface TabbarButton : UIButton@property (nonatomic, strong) UIButton *badgeValueView;- (void)setItemBadgeNumber:(NSInteger)number;-....
分类:
编程语言 时间:
2014-11-08 11:48:41
阅读次数:
209
//在.h文件中声明一下
//例如:@property(nonatomic,strong)UITableView *table;
//创建一个UITableView
self.table = [[UITableView alloc] initWithFrame:self.bounds style:(UITableViewStylePlain)];
//设置行...
分类:
移动开发 时间:
2014-11-06 23:41:22
阅读次数:
439
使用的是storyBoard
1拖一个UISearchDisplayController到tableView的headerView上,并声明成全局变量
@property (strong,
nonatomic) IBOutlet
UISearchDisplayController *searchDispalyController;
@property (weak,
nonat...
分类:
其他好文 时间:
2014-11-06 17:46:22
阅读次数:
220
1 属性或者成员变量中不能加括号@property (nonatomic, weak)id delegate;这个写法中id不能加小括号,比如(id)语法是不正确的。2 在作为函数参数中需要加小括号ios中函数参数的类型是用小括号的,所以delegate的尖括号外也需要有小括号比如下面:1 - (N...
分类:
移动开发 时间:
2014-11-06 16:50:15
阅读次数:
193
@interfaceLoginViewController:UIViewController<UIWebViewDelegate>@property(nonatomic,retain)UIWebView*webview;@property(nonatomic,retain)NSString*accessToken;@property(nonatomic,retain)UIActivityIndicatorView*FbActive;@end@interfaceLoginViewController..
分类:
Web程序 时间:
2014-11-06 11:09:57
阅读次数:
153
//一般情况下,在声明字符串对象的时候使用 copy//UI对象使用weak//其他对象使用strong@property(nonatomic,copy)NSString *name;@property(nonatomic,weak)UIImage *image;@property(nonatomi...
分类:
其他好文 时间:
2014-11-06 00:41:24
阅读次数:
124
1:创建一个model数据模型#import @interface DataModel : NSObject//保存section中每行的数据@property(nonatomic,strong)NSMutableArray *array;//section名@property(nonatomic,...
分类:
其他好文 时间:
2014-11-05 16:33:48
阅读次数:
125
单击一个已有的按钮后自动创建一个新的按钮,并为新按钮添加事件,使得单击时弹出提示框。
在viewcontroller.h中添加
@property (weak,
nonatomic) IBOutlet
UIButton *addbutton;
为这个按钮添加响应事件addbutton
在viewcontroller.m中添加
- (IBAction)ad...
分类:
移动开发 时间:
2014-11-05 14:55:04
阅读次数:
397
在声明一个类的属性时,默认这个属性会被修饰atomic,意思是原子性访问的。nonatomic和atomic修饰的属性,在自己没有重写setter和getter的时候才会发生作用,其主要的作用可以理解为,atomic修饰的setter和getter在多线程下面是互斥的,相当于setter和gette...
分类:
移动开发 时间:
2014-11-05 01:50:00
阅读次数:
344