views:

340

answers:

2

Hello,

 I need to customize the page where on any event the customizable "Button menu pane" has been visible from the bottom, just like one of the application "Twitterrific" (please see the screenshot). I've tried to implement through with modalViewController properties but it populate my customizable view on the whole screen and my parent view is disappeared in the background.

**Little Code snippet:**

MyCustomizableButtonMenuContoller *buttonMenucontroller = [[MyCustomizableButtonMenuContoller alloc] init];

//To show my customizable button menu from bottom at parent view on any event. [self presentModalViewController:buttonMenucontroller animated:YES];

//To hide customizable button menu. [self dismissModalViewConrollerAnimated:YES];

I v'e also tried to transparent my customizable button menu view but it doesn't work on my requirement. The UIActionsheet seems to be the one i'm looking for but again is it possible to customize the buttons with images?? If there are any other ways to achieve the scenario in the screen shot, please let me know about your findings or ideas.

Screenshot: http://scaline3.appspot.com/Button_menu_pane.png

Thanks in advance.

A: 

Apple's example in their documentation seems to make use of Navigation Controllers. This might give you some help: Using Modal View Controllers

Good luck!

Simon
Thanks Loki for the quick reply and share your thoughts, but what was i looking for achieved through UIView's animation.
nabeelmukhtar
+3  A: 

Hi nabeel,

You don't want to use a modal view controller for this. You can't achieve this "partial overlay" effect that way, because the iPhone OS makes several assumptions about the views of nested view controllers.

Instead, you need to create a UIView with several UIButtons inside that is initially hidden off the bottom of your primary view. When the user clicks the customize button, you need to animate the view upwards into place. The panel will be part of your main controller, but your code shouldn't be too much different.

If you're just getting started with Objective-C, you should read the Core Animation documentation. You should be able to animate the view into place with very, very little code. Here's an example:

[UIView beginAnimations:nil context: nil];
[UIView setAnimationDuration: 0.5];
[myDetailPane setFrame:CGRectMake(0, [self bounds].size.height - [myDetailPane bounds].size.height, [myDetailPane bounds].size.width, [myDetailPane bounds].size.height)];
[UIView commitAnimations];

No timers or gradual movement of the view is necessary - the system will take care of it.

Ben Gotow
Hello Ben,Thanks mate u've made my day ;), it's working kinda awesome through Core animation. bravo!!
nabeelmukhtar
Hello Ben, I've made the custom button menu through animation, but now when i'm trying to display the "custom menu button" it will hide under the tabBarController. Can you please tell me which will be the best to hide the tab bar when my "customized menu button pane" is visible.Thanks in advance.
nabeelmukhtar