frame:类型是CGRect @property (nonatomic) CGRect frame; 控件所在矩形框的位置和尺寸(以父控件的左上角为坐标原点)bounds @property (nonatomic) CGRect bounds; 控件所在矩形框的位置和尺寸(以自己左上角为坐...
分类:
其他好文 时间:
2014-10-28 00:16:59
阅读次数:
293
首先是一个库:然后设置一个工具类.h 1 @interface HMFoundLocation : NSObject 2 3 AS_SINGLETON(HMFoundLocation) 4 5 @property(nonatomic,strong)NSString *address; 6 7 ...
分类:
移动开发 时间:
2014-10-24 18:02:48
阅读次数:
240
直接上代码:示例:(在storyboard中拖两个控件textField、一个UIButton,连线(userNameText、password、login))@interface ViewController()@property(nonatomic,weak)IBOutlet UITextFie...
分类:
移动开发 时间:
2014-10-23 22:37:39
阅读次数:
216
NetWorking.h#import<Foundation/Foundation.h>typedefvoid(^FinishBlock)(idresponseObject);@interfaceNetWorking:NSObject@property(nonatomic,strong)FinishBlockfinishBlock;+(void)GetDataWithURL:(NSString*)urlfinshedBlock:(FinishBlock)block;@endNetWorking.m..
分类:
其他好文 时间:
2014-10-23 21:09:07
阅读次数:
287
1 1> UIButton内部默认有个UIImageView、UILabel控件,可以分别用下面属性访问: 2 @property(nonatomic,readonly,retain) UIImageView *imageView; 3 @property(nonatomic,readonly,r....
分类:
移动开发 时间:
2014-10-21 15:20:44
阅读次数:
186
直接上代码示例1:@interface TBViewController()//队列@property(nonatomic,strong)NSOperationQueue *queue;@end//队列的暂停和继续(在storyboard中拖两个按钮,分别为暂停、继续,连线)//暂停-(IBActi...
分类:
移动开发 时间:
2014-10-21 00:48:51
阅读次数:
229
AlertView.h#import @interface AlertView : UIView@property (strong, nonatomic) UILabel *messageLabel;@endAlertView.m#import "AlertView.h"@interface Ale...
分类:
其他好文 时间:
2014-10-18 01:52:05
阅读次数:
184
#import "ViewController.h"@interface ViewController (){ }@property (nonatomic,strong) dispatch_semaphore_t sema;@end@implementation ViewControll...
分类:
其他好文 时间:
2014-10-16 20:24:43
阅读次数:
170
eg:数据库表对象
@interface Meditation :
NSManagedObject
@property (nonatomic,
retain) NSString * order;//用来排序的属性值,用0、1、2、3...排序
@end
//在这个方法里操作
- (void)tableView:(UITableView *)tableView ...
分类:
编程语言 时间:
2014-10-15 18:22:01
阅读次数:
113
利用一个类方法来创建一个数组, 关于什么是类方法, 同学们麻烦请回去自行查找, 这里不做解释, 下面我们来看看方法和例子.涉及的方法:@property (nonatomic, assign) int age: 定义一个int age 的属性.+ (instancetype)arrayWithArr...
分类:
其他好文 时间:
2014-10-15 15:35:43
阅读次数:
168