美文网首页
Mac Dev Part 6 - ContainerView &

Mac Dev Part 6 - ContainerView &

作者: 遇见Miu | 来源:发表于2019-03-06 15:47 被阅读0次

时间是挤出来的

感觉需要加快点脚步才行呀,时间感觉总是不够用

1.ContainerView的创建

ContainerView感觉类似于iOS中的childVieewController,拖入SB中会自带一个viewController

效果:


ContainerView.jpg

2.NSViewController生命周期

感觉和iOS的基本上没有区别

viewDidLoad视图加载完毕

viewWillAppear视图即将显示

viewWillLayout视图即将布局

viewDidLayout视图布局完毕

viewDidAppear视图显示完毕

此处的viewWillLayout文档是这样解释的

You can override this method to perform tasks to precede the layout of the view controller’s view, such as adjusting Auto Layout constraints. If you override this method, call this method on super at some point in your implementation in case a superclass also overrides this method.

The default implementation of this method does nothing.

重写此方法,执行视图控制器视图布局之前的任务,可以调整自动布局约束

此处的viewDidLayout文档是这样解释的

You can override this method to perform tasks to follow the completion of layout of the view controller’s view. If you override this method, call this method on super at some point in your implementation in case a superclass also overrides this method.

The default implementation of this method does nothing.

相关文章

  • Mac Dev Part 6 - ContainerView &

    时间是挤出来的感觉需要加快点脚步才行呀,时间感觉总是不够用 1.ContainerView的创建 Containe...

  • Mac Dev Part 7 - Notification

    生活不易但是不能让它慢慢磨掉你向往美好的蓝图 1.NSNotification 和iOS上的通知没有什么区别,所以...

  • Mac Dev Part 9 - WindowViewContr

    时间是挤出来的我觉得每个Part可以多写点东西,这样不至于会写很多Part WindowController的to...

  • Mac Dev Part 8 - NSPopover

    今天周五,好好干活女生过节,不关我啥事= = 按钮弹出PopoverViewController,点击加号能够进行...

  • Mac Dev Part 3 - NSOutlineView

    其实周末也不能懈怠啊实现类似于QQ好友展开列表,发现Mac上实现还是很麻烦的 1.拖入SourceList, 创建...

  • Mac Dev Part 4 - NSOutlineView -

    自己选择的路,怎么都得走下去swift不熟悉,用的是另外一种思路,所以遇到问题有点束手无策 1.剪切板相关 2.U...

  • Mac Dev Part 10 - SplitViewContr

    最难的还是坚持啦吃完饭好好把今天的学习任务完成 偏好设置 将偏好设置和目标控制器进行连接(show的方式跳转),其...

  • Mac Dev Part 11 - NSToolbar

    最难的还是坚持啦好好工作好好码代码 NSToolbar 在Toolbar上拖入一个label,加入item spa...

  • Mac Dev Part 5 - NSAlertView &am

    时间挤的话,总是会有的比如说需求做完的时候,等同事接入的时候 1.NSAlert的两种弹出方式 首先创建NSAle...

  • Mac Dev Part 1 - Menu Bar

    时间总是挤出来的从今天开始进行记录和学习Mac开发 1.展示名为statusItembutton的图片到Mac的状...

网友评论

      本文标题:Mac Dev Part 6 - ContainerView &

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