• 1.30总结


    一:想成为单例的三个步骤

    1,在H文件中导入第三方框架#import “Singleton.h”;

    2,在H文件中写:#define singleton_interface(className)

    3.在M文件中写:#define singleton_implementation(className)

    二,如何使视图不从导航栏底下显示

    1,判断

    #define iOS7 ([[UIDevice currentDevice].systemVersion doubleValue] >= 7.0)

    2.使用:if (iOS7) {

            self.edgesForExtendedLayout=UIRectEdgeNone;

        }

    三,如何实现自动伸缩?

         对于iphone项目一般不需要横竖屏适配,但对于ipad项目一般需要横竖屏适配。具体实现为:

     UIViewAutoresizingNone就是不自动调整。

    UIViewAutoresizingFlexibleLeftMargin 自动调整与superView左边的距离,保证与superView右边的距离不变。

    UIViewAutoresizingFlexibleRightMargin 自动调整与superView的右边距离,保证与superView左边的距离不变。

    UIViewAutoresizingFlexibleTopMargin 自动调整与superView顶部的距离,保证与superView底部的距离不变。

    UIViewAutoresizingFlexibleBottomMargin 自动调整与superView底部的距离,也就是说,与superView顶部的距离不变。

    UIViewAutoresizingFlexibleWidth 自动调整自己的宽度,保证与superView左边和右边的距离不变。

    UIViewAutoresizingFlexibleHeight 自动调整自己的高度,保证与superView顶部和底部的距离不变。

  • 相关阅读:
    Chapter 4
    Chapter 3
    chapter 2
    Python编程指南 chapter 1
    BASE64 编码和解码
    生成 PDF 全攻略【2】在已有PDF上添加内容
    IDEA 和 Eclipse 使用对比
    web 前端常用组件【06】Upload 控件
    聊聊 Web 项目二维码生成的最佳姿势
    依附大系统 【数据实时获取】解决方案
  • 原文地址:https://www.cnblogs.com/shenshanyikuchai/p/4314806.html
Copyright © 2020-2023  润新知