Quantcast
Channel: C++博客-天使的白骨
Browsing latest articles
Browse All 11 View Live

Image may be NSFW.
Clik here to view.

UIPageViewController第一页不能自动适应子View的Frame的问题。

这个问题困扰了我两天,以为无解了,看了一天的英文资料,最后发现这是apple的BUG!shit解决方案是这样:连续调用setViewController两次。__weak UIPageViewController* pvcw = pvc;[pvc setViewControllers:@[page]...

View Article


Image may be NSFW.
Clik here to view.

解决iosUItableView的cell覆盖按钮内容的方案

在ios中编辑UITableView的时候,删除按钮会被表格元素遮挡,查了一下stackoverflow和Google,加上发展具有中国特色社会主义的代码方案,在UITableViewCell中加入:- (void)layoutSubviews {     [super layoutSubviews];     for (UIView *subview in self.subviews) {...

View Article


Image may be NSFW.
Clik here to view.

AFNetworking cache的BUG来了(AFNetworking 304 turned to 200 code)

根据HTTP的协议规定,304表示缓存,200表示成功,其他表示失败。AFNetworking默认是把304的Code变成200了,然后去拿缓存数据。这个在我们需要自定义304策略的时候会有问题。解决方案是为AFHTTPSessionManager的requestSerializer设置标准行为. [httpSessionManager.requestSerializer...

View Article

Image may be NSFW.
Clik here to view.

ios笔记,随记。

@import url(http://www.cppblog.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); Unknown class in Interface Builder file Check your...

View Article

Image may be NSFW.
Clik here to view.

solve crosse language of object-c & swift...

Chinese readers annotation:这个问题google,stackoverflow,github都还没有相关资料,所以把内容写成英文的,以便于帮助国外的朋友。English readers annotation:This problem has not been found by google or stackoverflow or github yet. So I writed...

View Article


Image may be NSFW.
Clik here to view.

How to find a range of a String in another String in swift

I tried to use NSMutableAttributedString to show a reach text in UILabel, but I've found it's hard to got a method to find out the range of the-string inside of a string. Here is what that I've...

View Article

Image may be NSFW.
Clik here to view.

swift技巧个人总结

1.跨语言(object-c,C++,C)全局变量和函数在object-c层面声明为extern的; 然后在对应的头文件中定义实际内容。例子://ConstVarible.h中的内容#pragma mark - 默认的app更新下载地址extern const int itunesId;extern const NSString *kNornalAppAddress;extern const...

View Article

Image may be NSFW.
Clik here to view.

swift 编码规范

@import url(http://www.cppblog.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); @import...

View Article


Image may be NSFW.
Clik here to view.

swift 去除String首尾的空格,以及指定字符串

@import url(http://www.cppblog.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); 直接给一段调用实例:@import...

View Article


Image may be NSFW.
Clik here to view.

UIImage无锯齿缩放(无锯齿),UIButton图片无锯齿缩放

没查到相关资料 ,说起来其实也挺简单的,就是使用UIImage的初始化函数重新初始化- (UIImage *)imageWithScale:(CGFloat)scale{    return [UIImage imageWithData:UIImageJPEGRepresentation(self, 1)...

View Article
Browsing latest articles
Browse All 11 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>