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
/* | |
* locationManager:didFailWithError: | |
* | |
* Discussion: | |
* Invoked when an error has occurred. | |
* Error types are defined in "CLError.h". | |
*/ | |
- (void)locationManager:(CLLocationManager *)manager | |
didFailWithError:(NSError *)error; |
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
- (void)applicationDidFinishLaunching:(UIApplication *)application { | |
// Add navigator | |
TTNavigator* navigator = [TTNavigator navigator]; | |
navigator.persistenceMode = TTNavigatorPersistenceModeNone; | |
TTURLMap* map = navigator.URLMap; | |
// Adding URL Map | |
[map from:@"*" toViewController:[TTWebController class]]; |
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
#pragma mark - | |
#pragma mark TTModelViewController method | |
- | |
(void)createModel { | |
TTDPRINT(@"Begain"); | |
self.dataSource = [[[RSSFeedDataSource alloc] | |
initWithSearchQuery:kBlogAccount] autorelease]; | |
} | |
#pragma mark - |
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
- (void)tableViewDidLoadModel:(UITableView*)tableView { | |
TTDPRINT(@"Start."); | |
NSMutableArray* items = [[NSMutableArray alloc] init]; | |
for (RSSFeed* rssFeed in _feedModel.feeds) { | |
// ...Handle the subtitle items. | |
[items addObject:[TTTableSubtitleItem | |
itemWithText:text subtitle:subTitle URL:accessURL]]; |
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
/* | |
* Begain to load | |
*/ | |
- (void)load:(TTURLRequestCachePolicy)cachePolicy more:(BOOL)more { | |
if (!self.isLoading && TTIsStringWithAnyText(_searchQuery)) { | |
// ... Prepare the feed URL | |
// ... Use TTURLRequest | |
// ... Use TTURLXMLResponse to use with response | |
// ... Request send |
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
- (UITableViewCell *)tableView:(UITableView *)tableView | |
cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |
// ... | |
} |
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
#import <Foundation/Foundation.h> | |
@interface MySingleton : NSObject { | |
} | |
+(MySingleton*)getInstance; | |
-(void) doSomething; | |
@end |
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
@implementation MySingleton | |
static MySingleton* _sharedInstance = nil; | |
+(MySingleton*)getInstance | |
{ | |
@synchronized([MySingleton class]) | |
{ | |
if (!_sharedInstance) | |
[[self alloc] init]; | |
return _sharedInstance; |
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
[[MySingleton getInstance] doSomething]; |
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
@interface ThirdViewController : UIViewController <UIActionSheetDelegate> |