摘要: 在IB中,当你使用Custom类型的Button时,你可以指定按钮的背景色。但当你运行时按钮就失去了圆角特性,你看到的仅仅是一个方块。因为custombutton没有定义任何属性默认值。你必须自己去定义它们,这就需要使用Core Animation Layer。提示:编写代码之前,需要导入Quart... 阅读全文
posted @ 2015-08-24 16:21 小毛驴 阅读(184) 评论(0) 推荐(0) 编辑
摘要: /** * 生成GUID */+ (NSString *)generateUuidString{ // create a new UUID which you own CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault); /... 阅读全文
posted @ 2015-08-24 15:44 小毛驴 阅读(752) 评论(0) 推荐(0) 编辑
摘要: 当我们想做一个弹出式菜单时,想将导航栏也一起盖住不显示的话,可以用如下语句实现:UIView* myView = /* 你自定义的view */;UIWindow* currentWindow = [UIApplication sharedApplication].keyWindow;[curren... 阅读全文
posted @ 2015-08-24 15:30 小毛驴 阅读(715) 评论(0) 推荐(0) 编辑
摘要: - (void)drawRect:(CGRect)rect{ // draw a rounded rect bezier path filled with blue CGContextRef aRef = UIGraphicsGetCurrentContext(); CGConte... 阅读全文
posted @ 2015-08-24 09:52 小毛驴 阅读(280) 评论(0) 推荐(0) 编辑