美文网首页
iOS工作问题记录

iOS工作问题记录

作者: 一盏盏灯 | 来源:发表于2017-03-17 11:25 被阅读19次
    PS:记录自己工作学习中的一些知识;

    一、项目中使用的三方库

    1、iOS

    引导页

    Onboard同时支持object-C、swift

    HcdGuideView简单点的

    HTML解析库

    Objective-C-HMTL-Parser
    hpple

    图片

    SDWebImage

    UITableVIewCell高度自适应

    UITableView-FDTemplateLayoutCell

    二、工作中遇到的问题记录

    IOS开发

    1、项目中如何单独设置某个ViewController屏幕自动旋转

    [iOS]代码控制APP中视图横屏/竖屏切换

    2、UIScrollView子UIViewController中按钮事件无响应

    例如:

    在UIScrollView中添加2个子视图

    [self.view addSubview:UIViewController1.view];
    [self.view addSubview:UIViewController2.view];
    

    当在UIViewController1中添加UIbutton,UIbutton的时间并不能被点击相应,是由于touch事件被UIScrollView劫持了,所以只需下面这样做,将控制器交给self.vew的子视图就可以了。

    [self addChildViewController:UIViewController1];
    [self addChildViewController:UIViewController2];
    
    3、关于iOS7以后有关translucent以及UIScrollView子视图偏移64像素问题

    http://blog.csdn.net/G_eorge/article/details/51144017

    http://blog.csdn.net/jeffasd/article/details/50738752

    https://segmentfault.com/a/1190000002936987

    4、UITableView中当数据未能满屏显示时,不显示多余分割线
    self.tableVIew.tableFooterView = [[UIView alloc]init];
    
    5、UITableView中如何顶格显示分割线

    (1)

    self.tableVIew.separatorInset = UIEdgeInsetsZero
    

    (2)

    if ([self.tableVIew respondsToSelector:@selector(setSeparatorInset:)]) {
                [self.tableVIew setSeparatorInset:UIEdgeInsetsMake(0, 0, 0, 0)];
     }
    
    6、iOS9 以上网络支持HTTPS,在info.plist中添加
    <key>NSAppTransportSecurity</key>
        <dict>
              <key>NSAllowsArbitraryLoads</key>
              <true/>
        </dict>
    
    7、获取当前显示的ViewController

    http://www.jianshu.com/p/f2210f5f7172

    如果根视图是UITabBarController
    UITabBarController *tabBarVc = (UITabBarController *)self.window.rootViewController;
     UINavigationController *nav = tabBarVc.selectedViewController;
    
    8 、IQKeyboardManager “Done”的修改为”完成”

    直接修改项目plist文件的Localization native development region为China,

    相关文章

      网友评论

          本文标题:iOS工作问题记录

          本文链接:https://www.haomeiwen.com/subject/nuhenttx.html