IPhone Based App - Some Global Dashboard Questions
I started iPhone development two months ago, so I can't call myself an "expert" ;-) But I've learned a lot in these two months, a lot here from stackoverflow :)
I'm working on an iPhone app based on the "Navigation App" app template ... My RootViewController is, of course, a UITableView. From this TableView I can go to some views and one TableView.
I am using a global toolbar called RootViewController. Buttons are added to it in the view that needs the buttons.
Now I have some questions regarding using the toolbar
-
I am embedding flex space with this code:
UIBarButtonItem * flexibleSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemFlexibleSpace target: self action: nil];
and fixed space like this:
UIBarButtonItem *fixedSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:self action:nil];
My question is, flexible space works, but how can I determine the fixed space it should have?
2. I noticed that my Todo Things application uses a global toolbar with toggle button sets. But in Things there is some kind of fading effect when changing the set of buttons. How can I do this in my application?
To change the items on the toolbar and make them disappear between two sets, try this instance method UIToolbar
:
- (void)setItems:(NSArray *)items animated:(BOOL)animated
Basically you store two sets of toolbox items in two arrays.
The docs say:
UIBarButtonSystemItemFixedSpace
Empty space to add between other items. Only the width property is used when this value is set.
Set the element's width property.
Thanks, it works now :-)
So question 1 is solved. Answers to question 2 are still welcome; -)