Autoresizing issue in Xcode 8

后端 未结 9 1849
无人及你
无人及你 2020-12-05 13:24

=== EDIT ========

This issue is now solved in Xcode 8.1. I have checked.

================

I don\'t know auto-layout

9条回答
  •  借酒劲吻你
    2020-12-05 13:42

    i also face same issue for scrollView in Xcode8

    i have a one solution to work with scrollView

    first take a simple UIView and add all component which you want add to in scrollView and give that component to autoSizing

    and also take one scrollView and programatically set view frame and also set scrollView contentSize and add your view into scrollView

    like wise, in my case i add this code in viewDidLoad for swift project

    // add view to scrollview
    
    self.scrollObjForNextAppointment.contentSize = CGSize(width:self.scrollObjForNextAppointment.frame.size.width,height:410)
    
    self.viewForScrollContent.frame = CGRect(x:0,y:0,width:self.scrollObjForNextAppointment.frame.size.width,height:410)
    
    self.scrollObjForNextAppointment.addSubview(self.viewForScrollContent)
    

    it's work for me, Thanks!

提交回复
热议问题