- 博客(19)
- 资源 (1)
- 收藏
- 关注
原创 iOS 点击键盘的return隐藏键盘
#pragma mark - UITextFieldDetegate- (BOOL)textFieldShouldReturn:(UITextField *)textField { [self.viewendEditing:YES]; return YES;}#pragma mark - UITextViewDelegate
2017-12-28 13:30:32
906
原创 iOS11 设置tableview的header或者footer高度无效的问题
_tableView.sectionHeaderHeight = 0.01;_tableView.sectionFooterHeight = 0.01;
2017-12-12 10:17:34
3485
原创 iOS11(仅是iOS11)刷新tableview会出现向上闪动的BUG
_tableview.estimatedRowHeight = 0;_tableview.estimatedSectionHeaderHeight = 0;_tableview.estimatedSectionFooterHeight = 0;
2017-12-11 17:55:09
4036
原创 ios开发 计算cell滑动到第几个
NSArrayNSIndexPath *> * cellArr = [_tableViewindexPathsForVisibleRows]; NSIndexPath * currentIndexPath = cellArr[cellArr.count -1]; _currentCountView.currentCountLabel.text = [NSString
2017-12-11 17:16:38
3231
原创 代码 label自适应 (计算label的宽和高)
- (void)setupLabel { UILabel *textLabel = [[UILabel alloc] init]; textLabel.font = [UIFont systemFontOfSize:16]; NSString *str = @"优快云博客-IT技术写作分享平台"; textLabel.text = str; text
2017-10-26 10:38:13
352
原创 ios textField开始输入时候 文字下移的问题
设置Modelself.contactPosition.clearButtonMode =UITextFieldViewModeWhileEditing;
2017-05-26 20:58:12
2794
1
原创 iOS 开发修改 searchbar 的背景颜色
/**先取消背景颜色*/- (UIImage *)imageWithColor:(UIColor *)color size:(CGSize)size { CGRect rect =CGRectMake(0,0, size.width, size.height); UIGraphicsBeginImageContext(rect.size); CGC
2017-04-19 15:56:08
401
原创 ios 修改 label 的行间距
- (void)changeLabelLines { NSString * textStr =self.detailLabel.text; // 调整行间距 NSMutableAttributedString *attributedString = [[NSMutableAttributedStringalloc] initWithString:t
2017-04-10 15:25:30
253
原创 iOS计算两天相差多少天
只需传入两个日期/**任意两天相差天数*/+ (NSInteger)getTheCountOfTwoDaysWithBeginDate:(NSString *)beginDate endDate:(NSString *)endDate{ NSDateFormatter *inputFormatter = [[NSDateFormatteralloc
2017-03-28 14:51:16
2940
原创 计算某一天是周几
/**计算周几*/+ (NSString *)getTheWhichDayOfWeekWithDate:(NSString *)dateStr{ NSDateFormatter *inputFormatter = [[NSDateFormatteralloc] init]; [inputFormatter setLocale:[[NSLocalealloc] i
2017-03-28 10:55:58
505
原创 ios 开发在有导航的controller 上创建覆盖导航条的 view
解决办法 :[[UIApplication sharedApplication].keyWindow addSubview:]
2017-03-24 15:20:53
986
原创 iOS 修改searchBar cancel 按钮为取消 并修改颜色
- (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar { [searchBar setShowsCancelButton:YES]; for (UIView *viewin [[_searchBar.subviewslastObject] subviews]) { if
2017-02-27 17:38:41
941
原创 Pods written in Swift can only be integrated as frameworks
在使用cocoapod导入Swift第三方时出现这样的问题: Pods written in Swift can only be integrated as frameworks; add use_frameworks! to your Podfile or target to opt into using it. The Swift Pod being used is: Chart
2017-02-08 16:49:33
246
原创 IOS 开发解决环信聊天点击表情崩溃
如果你只是简单的实现了聊天功能! 直接按官方文档提示跳转EaseMessageViewController 这个类 ! 那么你点击表情,打算发送表情的时候 ,会出现崩溃错误,又没有什么原因! 解决办法: 在EaseMessageViewController 的viewDidLoad方法中的最后边加入这段代码再运行....
2016-12-06 10:20:10
1308
原创 解决iOS开发 百度地图点击协议方法不走的问题
- (void)mapView:(BMKMapView *)mapView onClickedMapBlank:(CLLocationCoordinate2D)coordinate { }此方法不走 解决方法为(手势冲突)- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shou
2016-10-24 10:39:57
1118
原创 记录: iOS 开发百度地图设置地图比例后不正确
问题: 点击按钮之后要实现 :1.中心点为用户当前的位置2.同时地图比例设置为17出现的为题为:1.地图中心点为用户的位置(实现正确),但是设置地图比例无效(变化了,但是和自己设置的不一致);原因: 地图的中心点和比例不能同时设置解决方法:解决中..........
2016-10-20 17:08:58
1544
原创 解决ios 开发百度地图设置中心点偏移无效的问题
[self.view addSubView:self.mapView]---------->修改为 sellf.view = self.mapView
2016-10-18 11:32:54
1190
1
原创 iOS开发block传值基本使用方法
/**A : .m*/#import “controllerA.h”#import "controllerB.h”@interface controllerA ()@property (nonatomic,strong) UITextField *textFieldA;@property (nonatomic,strong) UIButton *
2016-08-05 11:21:02
399
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人