码迷,mamicode.com
首页 >  
搜索关键字:nsinteger    ( 574个结果
依据输入的内容打印出菱形
/* 5 依据输入的内容打印出菱形 */ +(void)print:(NSInteger)count blankString:(NSString*)blankString flagString:(NSString*)flagString /* { NSMutableString * ptr = [[ ...
分类:其他好文   时间:2017-04-25 10:07:51    阅读次数:187
iOS常用手势识别器
手势识别状态: typedef NS_ENUM(NSInteger, UIGestureRecognizerState) { // 没有触摸事件发生,所有手势识别的默认状态 UIGestureRecognizerStatePossible, // 一个手势已经开始但尚未改变或者完成时 UIGestu ...
分类:移动开发   时间:2017-04-15 20:45:35    阅读次数:206
关于日期和时间戳的转换比较
#pragma mark - 将某个时间戳转化成 时间 -(NSString *)timestampSwitchTime:(NSInteger)timestamp andFormatter:(NSString *)format{ NSDateFormatter *formatter = [[NSDa ...
分类:其他好文   时间:2017-03-25 10:39:05    阅读次数:614
iOS 调整UIPageControl圆点大小
创建一个类,继承UIPageControl,重写setCurrentPage方法,可设置圆点大小 - (void) setCurrentPage:(NSInteger)page { [super setCurrentPage:page]; for (NSUInteger subviewIndex = ...
分类:移动开发   时间:2017-02-27 15:52:39    阅读次数:871
iOS开发经验总结一
1、使用%zd打印NSInteger ,%tu打印NSUInteger 2、UIScrollView在iOS7中使用了Autolayout导致不能滚动,方法是添加scrollview的content高度 3、UICollectionView的数据不够,无法滑动,解决方案:tableview的数据无论 ...
分类:移动开发   时间:2017-02-23 19:02:25    阅读次数:335
UIStackView
1. 使用UIStackView,要知道,其子视图的很多约束就无效了 2. 使用UIStackView,要知道,需要先把其约束设置好 3. UIStackView的属性: 3.1 alignment 主要设置非轴方向子视图的对齐方式。typedef NS_ENUM(NSInteger, UIStac ...
分类:其他好文   时间:2017-01-28 12:55:13    阅读次数:314
contentMode
UIView有个UIViewContentMode类型的属性contentMode,可以通过它来修改视图的内容显示模式。 view sourceprint? 01.typedef NS_ENUM(NSInteger, UIViewContentMode) { 02.UIViewContentMode ...
分类:其他好文   时间:2017-01-11 15:38:26    阅读次数:233
计算两个日期之间的天数
//计算两个日期之间的天数 - (NSInteger)calcDaysFromBegin:(NSDate *)beginDate end:(NSDate *)endDate { NSDateFormatter *dateFormatter=[[NSDateFormatter alloc] init] ...
分类:其他好文   时间:2016-12-23 09:55:16    阅读次数:167
比较两个NSDate类型的参数相差的时间差
+(NSInteger)getDaysFrom:(NSDate *)serverDate To:(NSDate *)endDate { NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarI ...
分类:其他好文   时间:2016-12-08 03:22:21    阅读次数:153
iOS图片拉伸
常用的图片拉伸场景有:聊天页面的气泡,需要根据内容拉伸,但圆角拉伸后会变形,为避免圆角拉伸,可以指定拉伸区域。UIImage实体调用以下方法即可指定拉伸区域。 - (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth ...
分类:移动开发   时间:2016-12-07 13:54:33    阅读次数:186
574条   上一页 1 ... 4 5 6 7 8 ... 58 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!