摘要:
#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) { . 阅读全文
摘要:
记得加入框架#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 阅读全文