1. Questions about custom Navigationcontroller settings
Such as: Secondviewcontroller inherits from a Fatherviewcontriller base class, Fatherviewcontriller it inherits from Uiviewcontroller, Some of the common parts of the control are set in Fatherviewcontroller, where Titlelabel is a property of its set caption, and if you want to modify the title in Secondviewcontroller, use the property modification directly, Navigation items cannot be modified using navigation items and can only be used on view controllers that inherit directly from Uiviewcontroller and are not used on a view controller that indirectly inherits from Uiviewcontroller.
[Email protected] "2134;
Workaround:?? Create a UIView control directly and add it to the Self.view
For example, a view controller that inherits directly from Uiviewcontroller can use navigation items: Navigationitem has a Titleview property and can set the caption.
?
2. About the use of Xib
When we drag a local small range of controls, it is convenient to use xib, but there is an easy place to ignore: when we want to encapsulate a control, the encapsulated control cannot be used on the parent class that has the subclass inheritance, because, when the subclass inherits, we have xib encapsulated controls that are not well inherited.
For example:
Create a control that inherits from UIView, named: CustomView, which has a button and a label on it and loads it onto Fatherviewcontroller, Fatherviewcontroller is a base class, There are many subclasses that inherit from Fatherviewcontroller, and these subclasses are not very good at inheriting the controls we have defined on the CustomView.
Workaround: Create a control on a custom-defined customview with pure handwritten code so that there is no problem that cannot be inherited.
?
?
3. Questions regarding the use of Uiscrollview
We use Uiscrollview primarily to display scrolling views, but often sometimes the view cannot be scrolled, summarizing several reasons:
(1) Frame not set
(2) No settings contentsize, or the display is smaller than the screen size
(3) IOS? There is a screen adaptive, to cancel
Fall into the pit