Created
May 5, 2013 04:36
-
-
Save Alos/5519721 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)tabView:(CPTabView)tabView shouldSelectTabViewItem:(CPTabViewItem )tabViewItem{ | |
if([tabViewItem identifier] == "AddCharacterTabViewItem"){ | |
tabCounter ++; | |
CPLog.trace("Tabview was add character, returning no"); | |
var newCharacterSheetView = [[CharacterSheetView alloc] initWithFrame:CPRectMakeZero()]; | |
var newCharacterViewTab = [[CPTabViewItem alloc] initWithIdentifier: tabCounter]; | |
[newCharacterViewTab setLabel: @"New Character"]; | |
[newCharacterViewTab setView: newCharacterSheetView]; | |
[characterTabs insertTabViewItem: newCharacterViewTab atIndex: tabCounter]; | |
return NO; | |
} else { | |
return YES; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment