
Object-C
coding小王
若有咖啡今朝醉,没了咖啡赶紧睡。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Ipad项目中用到的UIModalPresentationFormSheet,点击阴影部分dismiss 当前presented的controller
这个文章学到的知识:http://my.oschina.net/CreeveLiu/blog/347913?fromerr=Pg3JEnxF背景: xcode:Ver 7.0 sdk:9.0 1>IPAD项目 2>在一个大的controller(mainViewController)中推出一个小的controller(原创 2015-12-11 10:57:51 · 3243 阅读 · 0 评论 -
UICollectionView: 1>UICollectionViewFlowLayout流式布局
环境XCode:Ver 7.2DevelopeTarget: 9.2UICollectionViewFlowlayout CollectionView流式布局========================================================================================================UICollectionView 使原创 2016-01-03 21:23:38 · 999 阅读 · 0 评论 -
UILabel 文字靠右显示 并且 文字尾部距UILabel有一定的距离,使用attributeString
如题使用UILabel时候想要文字靠右显示,但是不想顶着UILabel的尾部显示,类似于设置UIButton 的edge。 UILabel好像不可以直接设置edge,所以选择使用UILabel的attributedText。以下是代码把想要的Label和想要表示的文字作为参数传入方法就可以了。- (void)setAttributeStringForPriceLabel:(UILabel *)lab原创 2016-01-03 22:04:57 · 7943 阅读 · 0 评论 -
在同一个label上显示 两种规格的字体
第一篇博客! -------------------------------------------------- 需求:在同一个label上显示 两种规格的字体。 例如:把字符串是320M(100M)中的M字号变小. 如图 → -------------------------------------------------- 解决方法: 给UILabel设置文本时候,使用UILa原创 2015-12-01 18:33:33 · 1053 阅读 · 0 评论 -
移除一个view上面的所有subview
如题:之前一直是遍历subviews,逐个removeFromSuperView.今天发现另外一种简便的方法: [myView.subviewsmakeObjectsPerformSelector:@selector(removeFromSuperview)];PS:加班 时间 过的 很快。 员们别忘了 写代码之余 锻炼身体。原创 2015-12-09 19:49:45 · 570 阅读 · 0 评论 -
Iphone中的UIPopoverController
前言UIPopoverController这个东西在9.0之后就只属于Ipad了,取而代之的是使用UIModalPresentationPopover 。下面以Storyboard的形式实现Iphone中UIModalPresentationPopover的使用。环境Xcode: Ver7.2.1 IOS:9.2效果图Storyboard设定代码- (IBAction)popoverButton原创 2016-04-01 14:32:45 · 2040 阅读 · 0 评论 -
UITextField左边缩进
UIView *spaceView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 20, 20)]; textField.textAlignment = NSTextAlignmentLeft; textField.leftViewMode = UITextFieldViewModeAlways; textField.leftView = s原创 2016-03-09 19:07:32 · 405 阅读 · 0 评论