Answer the question
In order to leave comments, you need to log in
How to create a "draft" of an object in SWIFT?
Good evening everyone.
Please tell me if it is possible to create a blank object, for its further copying, and let's change the text on each of them.
I'm learning about Scroll View, and experimenting with "shaping" its objects. I want to understand how you can create a 1-in object, with all the necessary elements (a picture, a button is allowed on it and a description), and just copy it through the code, changing the text, and its frame.origin.
Answer the question
In order to leave comments, you need to log in
It is necessary for you, most likely, to read the general bases of OOP. The class is your " drawing " of the object. When in another class you create an instance of this class, for example
let myScrollView = MyScrolView()
, now the myScrollView variable points to the actually already created object of the MyScrollView class, you can change the parameters of this variable.
So create a view in xib, what's the problem. In general, the table view is best suited for lists.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question