![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
iOS 开发
YangGeY
这个作者很懒,什么都没留下…
展开
-
Swif算法学习-岛屿周长问题
岛屿周长问题一 问题描述给定一个包含 0 和 1 的二维网格地图,其中 1 表示陆地 0 表示水域。网格中的格子水平和垂直方向相连(对角线方向不相连)。整个网格被水完全包围,但其中恰好有一个岛屿(或者说,一个或多个表示陆地的格子相连组成的岛屿)。岛屿中没有“湖”(“湖” 指水域在岛屿内部且不和岛屿周围的水相连)。格子是边长为 1 的正方形。网格为长方形,且宽度和高度均不超过 100 。计算这个岛屿的周长。示例 :[[0,1,0,0], [1,1,1,0], [0,1,0,0], [1原创 2020-10-30 20:56:22 · 258 阅读 · 0 评论 -
2018年9月11号最新CocoaPods安装教程(cocoapods更改ruby源报错:bad response Not Found 404 (https://gems.ruby-china.or)
1.详细教程不做解释,请参考网络大部分文章2.针对cocoapods更改ruby源报错:(bad response Not Found 404 (https://gems.ruby-china.or)解决办法: gem sources --add https://gems.ruby-china.com/ --remove https://gems.ruby-china.org/ ...原创 2018-09-11 15:01:50 · 832 阅读 · 0 评论 -
iOS开发解决UITableViewCell和添加侧滑手势冲突的问题
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { if ([NSStringFromClass([touch.viewclass]) isEqualToString:@"UITableViewCellConte原创 2016-02-26 11:55:17 · 4045 阅读 · 0 评论 -
iOS7.0以后滑动退出键盘
self.tableView.keyboardDismissMode = UIScrollViewKeyboardDismissModeInteractive;原创 2016-04-01 11:17:03 · 794 阅读 · 0 评论 -
ios iOS中数字的格式化 NSNumberFormatter
NSNumberFormatter 和NSDateFormatter 是NsFormatter的子类。NSNumberFormatter类有个属性numberStyle,它是一个枚举型,设置不同的值可以输出不同的数字格式。该枚举包括: enum { NSNumberFormatterNoStyle = kCFNumberFormatterNoStyle, //转载 2016-02-22 12:46:53 · 485 阅读 · 0 评论 -
NSMutableAttributedString字体颜色等属性
#import "ViewController.h"#import @interface ViewController ()@end@implementation ViewController- (void)viewDidLoad{ [super viewDidLoad]; //学习内容 /* 1.控件 UIView UILabel UITex转载 2016-03-04 16:08:24 · 1105 阅读 · 0 评论 -
iOS开发绘制三角形和添加文字改变文字大小颜色
CGFloat trailWidh = 0; // UIFont *font = [UIFont systemFontOfSize:14]; if (kScreenHeigth != 736) { trailWidh = 25; // font =[UIFont systemFontOfSize:12];原创 2016-02-17 20:23:08 · 393 阅读 · 0 评论 -
解决Presenting view controllers on detached view controllers is discouraged <PersonInfoViewControlle警告
[self.view.window.rootViewController presentViewController:controller animated:YES completion:nil];原创 2016-01-14 16:57:38 · 386 阅读 · 0 评论 -
使用iconfont时进行拼接字符图标
NSString *iconColorStr = [NSString stringWithFormat:@"0xff%@",childModel.color]; unsigned long color = strtoul([iconColorStr UTF8String],0,16);//转化为16进制 self.iconLabel.textColor= UIColor原创 2016-01-14 08:20:20 · 1207 阅读 · 0 评论 -
iOS开发-----json解析的数据有图片的数据流导致解析失败
AFHTTPRequestOperationManager *mgr = [AFHTTPRequestOperationManagermanager]; mgr.requestSerializer = [AFHTTPRequestSerializerserializer]; //设置请求格式,请求格式为json格式 mgr.responseSerializer原创 2016-01-13 13:21:30 · 774 阅读 · 0 评论 -
iOS开发—去除UITableView多余Cell的横线
UIView *view = [UIViewnew]; view.backgroundColor = [UIColorclearColor]; [self.tableViewsetTableFooterView:view];原创 2015-12-16 09:01:44 · 1760 阅读 · 0 评论 -
iOS开发-对数组进行排序
-(NSMutableArray*)backDescendingOrderArray:(NSMutableArray *)array{ [array sortUsingComparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) { RecentlyNoticeModel *modela原创 2015-12-23 13:08:38 · 362 阅读 · 0 评论 -
iOS开发--去除记载文字时UIWebView出现下划黑线(横线)
如上图讲Draw的Opaque属性去掉。原创 2015-12-23 10:33:51 · 1658 阅读 · 0 评论 -
iOS开发—获取系统键盘高度
- (void)viewDidLoad{ [super viewDidLoad]; //增加监听,当键盘出现或改变时收出消息 [[NSNotificationCenter defaultCenter] addObserver:self s原创 2015-12-23 08:58:26 · 414 阅读 · 0 评论 -
iOS-cell 侧滑多样式iOS 8
-(NSArray*)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath{ UITableViewRowAction *rowAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActio原创 2016-01-19 17:38:18 · 351 阅读 · 0 评论 -
iOS 实现图文混排
NSMutableAttributedString *str=[[NSMutableAttributedStringalloc] initWithString:@"设置文字"attributes:nil]; NSTextAttachment *attachment=[[NSTextAttachmentalloc] initWithData:nilofType:nil]原创 2016-01-18 14:39:50 · 308 阅读 · 0 评论 -
iOS 开发之一个挺操蛋的问题,Xcode刚打开工程文件展示区显示不出所有文件。
1.Xcode刚打开工程文件展示区显示不出所有文件,解决方法在Navigate下的Reveal in Project Navigatator。原创 2015-12-16 08:18:04 · 1221 阅读 · 0 评论 -
iOS开发-利用xib怎么为UITableView 设置tableHeaderView
1.添加一个和File's Owner 独立的UIView 不是View的subView,2.将xib上的UITableView和UIView分别在对应的视图控制器上添加属性,self.tableView.tableHeaderView = self.view;原创 2015-12-16 08:27:11 · 3630 阅读 · 1 评论