setMasksToBounds】的更多相关文章

setMasksToBounds 在IB中,当你使用Custom类型的Button时,你可以指定按钮的背景色.但当你运行时按钮就失去了圆角特性,你看到的仅仅是一个方块.因为custombutton没有定义任何属性默认值.你必须自己去定义它们,这就需要使用Core Animation Layer. 提示:编写代码之前,需要导入QuartzCore框架到工程中,然后#import<QuartzCore/QuartzCore.h>.我会通常会把它放在.pch文件中. IB没有干的事情,你只能通过代码…
昨天去一家公司面试,面试官问了我在项目开发中遇到过哪些问题,是什么引起的,怎样解决的? 当时由于有点小紧张只说出了一两点,现在就来好好总结一下. 问题: 1.两表联动 所谓的两表联动就是有左右两个表格,左边的表格由二个分类构成,大分类用HeaderView 展示,小分类用cell 展示;右边的表格负责展示分类下的商品.  通过左边的分类点击展示对应右边表格的商品好处理,通过tableView的didSelectRowAtIndexPath 方法就能解决,可关键是滑动右边的表格要对应选中左边的分类…
类似于QQ空间的布局主要是在说说信息.点赞.回复三大部分的自适应布局上. 当我们需要搭建类似QQ空间.微信朋友圈的界面的时候,可做如下操作: 创建一个对应的model类: 创建一个对应model类的frameModel类,并将对应的model封装进这个frameModel类.frameModel类是将model对应显示的data的控件frame转换为一个可持久化的frame,这样一来,就可以在第3布容易很多: 创建一个talbleviewcell,根据 model可能显示的对象,初始化cell,…
代码: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. [self showAlertView:@"11111"]; } //自定义弹出框 -(void)showAlertView:(NSString *)strTipText { UIView *showView=[[UIView alloc]init]; [showView setFrame:C…
前言:博主接触iOS的编程也有一段时间,今天把有关UI控件的一些知识在这里做一些总结. 申明:此系列文章都是使用目前最新版本swift3.0.1进行讲解的,与其他版本可能略有差异. 一,UIKit之设置圆角及阴影(对于lable和button这两个简单控件就不介绍了) let imageView = UIImageView(frame: CGRect(x: , y: , width: , height: )) imageView.backgroundColor = UIColor.brown s…
代码: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. self.title=@"圆角矩形"; UIImageView *imageView=[[UIImageView alloc]initWithFrame:CGRectMake(50, 100, 100, 100)]; imageView.backgroundColor=[UIColor red…
http://robots.thoughtbot.com/designing-for-ios-graphics-performance  [原文] In the previous article, we explored different techniques to customize the look and feel of UIButton, assigning to each a difficulty level based on the complexity of the Object…
+(NSArray*)splitCode:(NSString*)code backzoneIndex:(NSInteger*)outIndex { /* 01 0102|0304 010203040506|01 |01 */ NSInteger backzoneIndex = ; NSArray* zoneArr = [code componentsSeparatedByString:@"|"]; ) return nil; NSMutableArray* splitArr = [NS…
动画在APP开发过程中还是经常出现,将花几天的时间对Facebook开源动画库 POP进行简单的学习:本文主要针对的是POPBasicAnimation运用:实例源代码已经上传至gitHub,地址:https://github.com/wujunyang/facebookPopTest Pop Github : https://github.com/facebook/pop Pop比较全的实例:https://github.com/kevinzhow/pop-handapp Popping -P…
// //  ViewController.m //  VIP // //  Created by chuangqu on 15/8/12. //  Copyright (c) 2015年 theway. All rights reserved. // #import "ViewController.h" @interface ViewController () @end @implementation ViewController UIButton *but; - (void)vie…