This file contains hidden or 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
| NSString *CellIdentifier; | |
| if (indexPath.row == X) && (indexPath.section == Y) { | |
| CellIdentifier = @"CellWithSubview"; | |
| } else { | |
| CellIdentifier = @"Cell"; | |
| } | |
| UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; | |
| if (cell == nil) { |
This file contains hidden or 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
| - (void)addObserver:(id)obj forSelector:(SEL)selector success:(SEL)success failure:(SEL)failure { | |
| [[NSNotificationCenter defaultCenter] addObserver:obj selector:success name:[self successNotificationNameForSelector:selector] object:nil]; | |
| [[NSNotificationCenter defaultCenter] addObserver:obj selector:failure name:[self failureNotificationNameForSelector:selector] object:nil]; | |
| } |
This file contains hidden or 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
| - (IBAction)Login:(id)sender | |
| { | |
| MGSimplenoteLogin *login = [[MGSimplenoteLogin alloc] init]; | |
| loginStatus.text = @"Logging in..."; | |
| login.email = self.userName.text; | |
| login.password = self.password.text; | |
| [login addObserver:self forSelector:@selector(login) success:@selector(loginSucceeded:) failure:@selector(loginFailed:)]; | |
| [login login]; | |
| } |
This file contains hidden or 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
| NSData *encodeData(NSData *input) { | |
| char encodeArray[512]; | |
| memset(encodeArray, '\0', sizeof(encodeArray)); | |
| encode([input length], (char *)[input bytes], sizeof(encodeArray), encodeArray); | |
| return [NSData dataWithBytes:encodeArray length:strlen(encodeArray)]; | |
| } |
This file contains hidden or 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
| NSString *viewName = [_views objectAtIndex:indexPath.row]; | |
| Class viewclass = NSClassFromString(viewName); | |
| if (nil != viewclass) { | |
| UIViewController *detailView = [[viewclass alloc] initWithNibName:viewName bundle:nil]; | |
| [self.navigationController pushViewController:detailView animated:YES]; | |
| [detailView release]; | |
| } |
NewerOlder