uialertview - iPhone: Is it Possible to Hide and Unhide UIACtionSheet Buttons? -
I am using FBConnect in my app. The log in action sheet button titles are titled "Log in Facebook" and "Logout Facebook", but I want to display "Login to Facebook" and "Publish on Facebook". Currently, it looks like this ...
... but I want to see it like this ...
... Probably set in these ways:
- (zero) session: (FBSession *) session didLogin: (FBUID) uid {// Show button logout} - (zero ) SessionDidLogout: (FBSession *) session {// log in to the show button}
response01 from the comment commentary - Warning sheet code:
- (IBAction ) MySheet: (id) this {UIActionSheet * menu = [[UIActionSheet alloc] initWithTitle: @ "Facebook" Representative: self-cancelButtonTitle: @ "Cancel" DestructiveButtonTitle: otherButtonTitles shoe Somewhere: @ "Share on Facebook" @ "sign in Facebook" @ "Logot Facebook" zero]; [Menu show invoice: self See]; [Menu release]; } After
Sure, just depending on the state, just a different UIActionSheet with those two buttons Show What about Facebook Connection?
- (IBAction) mySheet: (id) this {if (alreadyLoggedInToFacebook) {UIActionSheet * menu = [[UIActionSheet alloc] InitWithTitle: @ "FaceBack" Representative: Self Cancel Button Title: @ "Cancel" Destructive Button Tite: Zero Other Button Titles: @ "Share on Facebook", @ "Login Facebook", @ "Logout Facebook", @]; } Else {UIActionSheet * menu = [[UIActionSheet alloc] initWithTitle: @ "Facebook" Representative: AutoCodeButtonTitle: @ "Cancel" DestructiveButtonTitle: otherButtonTitles zero: @ "logout Facebook", zero]; } [Menu showviewview: self.view]; [Menu release]; }
Comments
Post a Comment