Comments (3)
Hi mradlmaier,
to add a logout item I normally set the SASlideMenuViewController table to use a dynamic prototype and I add something like:
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section == 0 && indexPath.row == 5) {
//LOGOUT
NSString* logout = NSLocalizedString(@"Log Out", @"Log Out");
NSString* cancel = NSLocalizedString(@"Cancel", @"Cancel");
UIActionSheet *actionSheet =
[[UIActionSheet alloc] initWithTitle:nil
delegate:self cancelButtonTitle:cancel destructiveButtonTitle:logout
otherButtonTitles: nil];
actionSheet.actionSheetStyle = UIActionSheetStyleDefault;
[actionSheet showInView:self.view];
}else{
[super tableView:tableView didSelectRowAtIndexPath:indexPath];
}
}
from saslidemenu.
But that would mean, that I have to change the whole thing to use dynamic prototype cells?
Is there no way to do this with static cells?
Best regards,
Michael
On 12 Jun 2014, at 12:28, stefanoa [email protected] wrote:
Hi mradlmaier,
to add a logout item I normally set the SASlideMenuViewController table to use a dynamic prototype and I add something like:-(void) tableView:(UITableView )tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if (indexPath.section == 0 && indexPath.row == 5) {
//LOGOUT
NSString logout = NSLocalizedString(@"Log Out", @"Log Out");
NSString* cancel = NSLocalizedString(@"Cancel", @"Cancel");
UIActionSheet *actionSheet =
[[UIActionSheet alloc] initWithTitle:nil
delegate:self cancelButtonTitle:cancel destructiveButtonTitle:logout
otherButtonTitles: nil];actionSheet.actionSheetStyle = UIActionSheetStyleDefault; [actionSheet showInView:self.view]; }else{ [super tableView:tableView didSelectRowAtIndexPath:indexPath]; }
}
—
Reply to this email directly or view it on GitHub.
from saslidemenu.
You can try to link the Log Out cell to a specific segue and implement the LogOut process in a different view controller.
from saslidemenu.
Related Issues (20)
- make status bar overlap leftMenu HOT 6
- provide initial segue which does not have a menu cell in the tableview HOT 2
- Enable/Disable menuitem HOT 6
- Swipe close menu HOT 2
- Whats the best way to add a Header to the (left)menu HOT 4
- Can I show another ViewController from different story board? HOT 6
- How to control interface orientation? HOT 6
- How to use SASideMenu with Tabbar Controller HOT 4
- How I can detect when the user click the menu icon?
- Gesture on Close Slide (Disable)
- Update from version 1.2.1 to 2.0.3 -> tableView:cellForRowAtIndexPath: not call HOT 2
- How I can manage status bar like GMail? HOT 3
- Slide Menu Tremor HOT 5
- Close Menu Programmatically
- The left Menu shifts down when in call? HOT 2
- Parallax effect? HOT 1
- Not working in iOS 10
- Show left menu as default screen
- Support for Swift Package Manager
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from saslidemenu.