- 博客(5)
- 资源 (2)
- 收藏
- 关注
原创 UICollectionView设置header悬浮效果
在iOS9.0后UICollectionView的头部视图也能像tableView的header一样出现悬浮挂住的效果。 UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init]; //header flowLayout.sectionHeadersPinToVisibleBo
2016-10-18 22:19:13 8148
原创 iOS开发 _计算缓存大小/清理
1.获取路径:// 获取Caches目录路径- (NSString *)getCachesPath{ NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask,YES); NSString *cachesDir = [paths lastObject];
2016-10-15 20:37:19 420
原创 UI基础_UIAlertController/UIAlertView使用和字体大小颜色
1.UIAlertView在iOS9.0后被抛弃UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil message:NSLocalizedString(@"请核对后重新输入",nil) delegate:self cancelButtonTitle:NSLocalizedString(@&quo
2016-10-09 15:39:35 7079
原创 IBInspectable和IB_DESIGNABLE
1.使用IBInspectable可以在xib/storyboard中方便的为类设置属性并看到效果. 在.h文件中声明属性,在属性中加关键字IBInspectable#import <UIKit/UIKit.h>@interface XYButton : UIButton@property (nonatomic, assign) IBInspectable CGFloat connerRadiu
2016-10-09 09:27:37 477
原创 runtime的使用总结
1.动态获得类的所有属性 注:需要导入头文件:+ (NSArray *)getAllProperties { NSMutableArray *arrM = [NSMutableArray array]; unsigned int count = 0; // 获得指定类的所有属性 objc_property_t *properties = class_copyProp
2016-10-08 20:29:35 307
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人