Can I define a UIView both in a feather AND by program?
source link: https://www.codesd.com/item/can-i-define-a-uiview-both-in-a-feather-and-by-program.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Can I define a UIView both in a feather AND by program?
Is this common practice or frowned upon? Are there any standards/resources for such a practice? What are the alternatives? I realize the question is broad, but I am new to iOS development and any information helps. Thanks!
EDIT: I do mean the same view.
Yes, you can interchange XIB-described objects with program-created ones, and you can do programed modifications of an XIB-instantiated object, or you can use an XIB-instantiated object inside a programmed view.
Basically an XIB just "generates code" (in a backwards sort of way) to instantiate the objects it describes, and once the root view and all of its subviews are created it's indistinguishable from its program-created twin.
Related Articles
How can a python function handle both the matrix numpy and the scalar?
In Bash, why can we define an environment variable by PS1 = 'something' and others must export SOME_VAR = 'something'?
Can CSS define the appropriate properties of a font?
How to run an application on both the Android activity and service?
Which XSLT processor supports both XSLT 2.0 and StAXSource?
How can I animate two UIView reacts to both?
How can I manage the construction of library projects that produce both a static library and a DLL?
Can I define a statement as a subset of the cases of another statement?
Can I define a unique function that handles & ldquo; change keyup & rdquo; event set to 2 input tags? Is that a good idea?
Can we declare, define & amp; assign values to a variable and use these variables in another file?
How can I define a many-to-many EF relationship between tables using Table-Per-Type inheritance?
C ++ 11: How can I define a function that accepts a universal reference of a specific type of object?
Can I define a variable in LaTeX?
By using C ++ classes as a function that can be defined in several different places
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK