摘要: #import <Foundation/Foundation.h>@interface Singleton : NSObject+ (Singleton*)sharedManager;@end#import "Singleton.h"static Singleton* sharedGizmoManager = nil;//static 静态实例是关键@implementation Singleton+ (Singleton*)sharedManager{ @synchronized(self){ if(sharedGizmoManager == nil) { . 阅读全文
posted @ 2012-11-19 21:47 天已界 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 记得加入框架#import <QuartzCore/QuartzCore.h>imgView.image = [UIImage imageNamed:@"defaultHead.png"];/*设置头像圆角,并加上灰色边框*/imgView.layer.masksToBounds=YES;imgView.layer.cornerRadius=10.0;imgView.layer.borderWidth=1.0;imgView.layer.borderColor=[[UIColor grayColor] CGColor];nameLabel_ = [[UILabe 阅读全文
posted @ 2012-11-19 17:51 天已界 阅读(2358) 评论(0) 推荐(0) 编辑