![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
iOS
_Hanbai
这个作者很懒,什么都没留下…
展开
-
键盘的隐藏事件
viewDidLoad方法里加载隐藏方法: { UserName(UITextField类型) } [self hiddenKeyBoard]; -(void)hiddenKeyBoard { UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] in原创 2016-11-08 16:29:15 · 353 阅读 · 0 评论 -
弹出键盘时视图上移
//在UITextField 编辑之前调用方法 //- (void)textFieldDidBeginEditing:(UITextField *)textField -(void)textViewDidBeginEditing:(UITextView *)textView { [self animateTextView:textView up:YES];原创 2016-11-08 16:34:26 · 370 阅读 · 0 评论 -
UILabel行间距调整
label(UILabel类型) label.attributedText = [label.text lineSpace:3]; -(NSAttributedString *)getAttributedStringWithString:(NSString *)string lineSpace:(CGFloat)lineSpace { NSMutableAttri原创 2016-11-08 16:36:45 · 377 阅读 · 0 评论 -
字典转json
dictArray =[NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"%d",goodsData.orderCount],@"goodsCount",goodsData.goodsName,@"goodsName",goodsData.goodsID,@"goodsId", nil];原创 2016-11-08 16:39:10 · 309 阅读 · 0 评论 -
按钮图片转换成颜色
-(UIImage *)imageWithColor:(UIColor *)color { CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f); UIGraphicsBeginImageContext(rect.size); CGContextRef context = UIGraphicsGetCur原创 2016-11-08 16:42:25 · 298 阅读 · 0 评论 -
iOS11 xcode9Cocoapods生成workspace文件时出错
首先,检查你的ruby源: 1、gem sources -l 默认情况是 *** CURRENT SOURCES *** https://rubygems.org/ 重要的位置: 这个源路径国内不能使用,之前是使用淘宝的镜像https://ruby.taobao.org/,现在发现这个也不能使用了,替换为http://gems.ruby-china.org/。原创 2017-11-22 09:33:44 · 406 阅读 · 0 评论 -
pod安装
1:更新rudy sudo gem update --system 2:更改镜像 1、gem sources --removehttps://rubygems.org/ 2、gem sources -a https://ruby.taobao.org/ 查看镜像成功:gem sources -l 3:安装cocoapods 以下的命令原创 2017-11-22 10:20:37 · 353 阅读 · 1 评论 -
pod install失败
今天想pod导入个推sdk,结果一直失败。。。如下提示: 在网上找了各种方法几乎都试过了还是不行,最后我想起来之前git上提交代码我们公司网络不行,开热点就可以,我就抱着侥幸心理开热点pod install了下立马成功了,我滴鬼鬼啊,,,真是搞不懂。。。。。。。。。。。。。。。。。。。。 ...原创 2019-03-13 18:40:48 · 2688 阅读 · 0 评论 -
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Deve
今天在运行脚本的时候pod search报这个错误: /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:118:in `git_version': Failed to extract git version from `git --version` ("xcrun: error: invalid acti...转载 2019-04-09 16:05:27 · 4589 阅读 · 0 评论