Alert pop up with buttons that give actions. I need help with having a button that allows me to share to facebook and twitter!, i already have buttons that do this but i want to incorporate it into the alert interface tips?
Related
I want to have this type of bar at the bottom of the application and whenever a button is clicked new buttons should popup, which one of them when clicked should take me to its connected view
You shouldn't use Popup as control, I'll recommend you to use it like a notification as this is not Apple way of showing controls.
Here is a nice link from boctor iDev recipes.
You can find here custom UITabBar as well Notification
I would suggest you not to try customizing UITabbar. This will go against the normal behavior of UITabbar and Apple may reject your app for tampering with normal behavior.
You can try having a UIView with a set of buttons in them and bring the similar functionality as in your image.
I added a UIProgressView to my UIActionSheet to indicate the download progress. So I do not want my UIActionSheet to be dismissed when user click the download button in it.
But is there a way to do that ?
Right now I implement didDismissWithButtonIndex delegate method to show UIActionSheet again after it was dismissed. But I was hoping there is a better way.
UIActionSheet is a modal view, which means that it blocks UI completely. Since blocking UI is considered a bad practice, preventing an action sheet from dismissing is not supported. Instead, you should make a completely separate progress indicator outside the action sheet.
#Yar, thanks for the answer, I will try your solution some other time.
But I am also satisfied with my current solution. UIActionSheet.h said
// Called when a button is clicked. **The view will be automatically dismissed after this call returns**
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex;
So I guess hit any buttons will always dismiss action sheet. Then my solution is first hide progress bar; when user hits download button, show action sheet again but hide the download button and show progress bar.
The cancel button is always there in case user wants to cancel download even after download is started.
I'm using UIActionSheet in one of my applications and I have a question . When the action sheet comes to front , everything else goes in background and I cannot interact anymore with my buttons or other objects in my view until I dismiss the action sheet . Is there a way to disable this feature ? I mean , if I have the action sheet displayed , can I still be able to use what goes in background ? If there is a way , I would really appreciate if you could show me how to do it.
There is no way to access the Background controls, If the UIActionSheet or UIAlertView comes to the front.
The action sheet is supposed to be modal. All user input will be captured by the action sheet until it is dismissed. So all the background controls cannot be interacted with by the user until it is gone.
I want to implement this on my app. I want to search for tutorials on this topic but I don't know what its called. Can someone please tell me what its called? Eg. In the photos app in iPhone, when u click on the left most button at the bottom, a screen pops up from the bottom giving you options to either email image, set as wallpaper etc.. So, once again, what is this called? Thanks
That is a UIActionSheet. Check out the UIActionSheet Class Reference.
Basically you create one with the designated initializer -initWithTitle:delegate:cancelButtonTitle:destructiveButtonTitle:otherButtonTitles: then send the -showInView: message to display it. You'll have to set yourself as it's delegate in order to handle selections made by the user.
The button is the 'action' barButtonItem type.
The button then opens a modal sheet. Opened with something like:
[self presentModalViewController:menuViewController animated:YES];
I am working on project where I have to add a dialog box on the click of tool bar button in such a manner when user click on the that a dialog box open with three buttons.
For Example if user click on share button then a dialog box open (pointing to that button) containing three buttons facebook, twitter, email.
Please be sure that I dnt want to use action sheet.
Please provide any sample code or any tutorial.
You could create a viewcontroller object with three desired buttons on its view. And then On the viewcontroller where you're currently on you can call presentModalViewController:animated method. Like:
MyModalViewController *modalController=[[MyModalViewController alloc]init];
....... then whereever you touch up the tool bar button you can say:
[self presentModalViewController:modalController animated:YES];
But you should not forget to call dismissModalViewControllerAnimated at some point(probably write this inside a button touchupinside target action method) on the dialog box to avoid having the modal view stuck on the screen forever. :)