I have two UIViews in the first one is a variable number of UIButtons that emerge in Unfortunately, they only work when you call them in How can I solve this problem beautifully? Edit 1: Here's a simple way I'm using the View 2 adjustment Edit 2: This is something like adding my button, changing the size of my first scene, and calculating how far the next one should go why not (Do not forget to call two rows
ViewDidAppear: method or later. This means that when my thoughts are loaded and when my elements are positioned properly, there is a small amount in between.
- Adjust (zero): (UIView *) See below: (int ) Below {CGRect frame = view.frame; Frame.origin.y = frame.origin.y + Down; View.frame = frames; }
- (Zero) addButtonsToView: (NSArray *) Button strings {// Float last tags Width = 0.0; Self.adjustdown = 0.0; (For NSString * str button button) {UIButton * button = [UIButtonTypeRoundedRect] with UIButton button; [Button Situation: Straight Forrest: (UIC Contolstate UIC IntrastalAnternal); CGSize size = [font size font: TAG_FONT]; If (previous togs width + size.width> 300) {previousTagsWidth = 0; Self.adjustown = + size.high + 10; } Button.frame = CGRectMake (PreviousLugsWithSwitch, Adjust, Size.width + 10, SizeHit +5); Previous latitude + = size Fourth + 20; [Self. View 1 Adsview: Button]; } CGRect frame = self.view1.frame; Frame.ize.height = frame.ize.height + self.adjustownown; Self.view1.frame = frames; }
viewWillLayoutSubviews or
viewDidLayoutSubviews ?
super !)
No comments:
Post a Comment