• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to create an empty stack view in code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to create an empty stack view in code


  • Subject: Re: How to create an empty stack view in code
  • From: Kyle Sluder <email@hidden>
  • Date: Mon, 07 Dec 2015 11:21:05 -0600

On Sun, Dec 6, 2015, at 10:10 AM, Dave wrote:
> Hi,
>
> I’m not sure what to use for the Frame though?

It doesn't matter. Auto Layout will change the frame on the first layout
pass anyway.

--Kyle Sluder

> The way this is setup is
> that I have a Stack View an empty Stack View in a NIB, as so:
>
> @property (nonatomic,strong)    IBOutlet NSStackView*
> pLabelMainRowStackView; //Vertical
>
> There is a then a Row Array which contains Column Arrays and each item in
> a Column Array is a Dictionary that contains the data for the
> Corresponding View.
>
> So in code, I create a Column (Horizontal) Stack View, Create a New View
> for the Dictionary Item and add it to the newly created Stack View. When
> all Columns in the Array have been added, add the Column Stack view to
> the pLabelMainRowStackView Stack view.
>
> All the Best
> Dave
>
> > On 6 Dec 2015, at 15:48, Jonathan Hull <email@hidden> wrote:
> >
> > You can just do [[NSStackView alloc] initwithFrame:]
> >
> >
> >> On Dec 6, 2015, at 6:23 AM, Dave <email@hidden> wrote:
> >>
> >> Hi All,
> >>
> >> How do I create an Empty Stack View in code? The only method I can find that that creates a Stack View is stackViewWithViews and you can’t pass nil to this. Do I have to pass an empty array or can I just do [[NSStackView alloc] init]; ?
> >>
> >> All the Best
> >> Dave

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >How to create an empty stack view in code (From: Dave <email@hidden>)
 >Re: How to create an empty stack view in code (From: Jonathan Hull <email@hidden>)
 >Re: How to create an empty stack view in code (From: Dave <email@hidden>)

  • Prev by Date: Re: Best Control for Catching a Mouse Click?
  • Next by Date: Re: Best Control for Catching a Mouse Click?
  • Previous by thread: Re: How to create an empty stack view in code
  • Next by thread: How to
  • Index(es):
    • Date
    • Thread