I want to create a sub-UIView in the interface builder (contained in UIScrollView) with some contained UILabels, then I want to programmatically “copy” this view, adjust its left position (multiple of its width) to achieve a “floating” left effect inside the UIScrollView. Then I want to add this copied UIView back to the UIScrollView with different text for UILabels.
The problem is that I don’t know how and if you can "copy" UIViews.
[ ], , . , , NSKeyedArchiver/NSKeyedUnarchiver / , .
, , :
-(UIView)makeMeANewMyView { // Load MyView.nib into the myView outlet. [[NSBundle mainBundle] loadNibNamed:@"MyView" owner:self]; // Take ownership. UIView * view = [[self.myView retain] autorelease]; self.myView = nil; return view; }
objective-c ( ). , , , , "" - , , , , -, . , UIView, ?
, , ... noob objective-c , !
Source: https://habr.com/ru/post/1749497/More articles:Java double-entry table - javaПочему BackgroundWorker в WPF нуждается в Thread.Sleep для обновления элементов управления пользовательского интерфейса? - c#How can I disable all HTML using markdown (PHP and JS)? - javascriptHow to break code for iOS 3.0 and iOS 3.2 so that I can use MPMoviePlayerViewController if OS 3.2 ++ - iphoneFind all the ways from the root to the leaves of the tree in the scheme - lispDifference between [object variable] and object.variable in Obj-C? - objective-cthe difference between → and. for a member select statement - c ++How to keep multiple accessString passwords safe, separate and easy to deploy? - securityValidating a valid WCF certificate with BasicHttpBinding - c #Encryption of connection strings so that other developers cannot decrypt, but the application still has access - .netAll Articles