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
#ifdef __OBJC__ | |
#import <UIKit/UIKit.h> | |
#import <Foundation/Foundation.h> | |
... | |
// Google アナリティクス | |
#import "GAI.h" //※ここを追記 | |
#endif |
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)filterContentForSearchText:(NSString*)searchText | |
scope:(NSString*)scope | |
{ | |
NSString *query = self.searchDisplayController.searchBar.text; | |
NSPredicate *namePred; // 名前用のPredicate | |
if([query length] == 0) { | |
return; | |
}else if ([query length] == 1) { // 検索窓に一文字しか入力されなかったときは、firstLetterから探す |
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
//高速列挙ではソートはしてくれないため、NSSortDescriptorを使います。 | |
//ソート対象となるキーを指定した、NSSortDescriptorの生成 | |
NSSortDescriptor *sortDescNumber; | |
sortDescNumber = [[NSSortDescriptor alloc] initWithKey:@"key" ascending:YES]; | |
// NSSortDescriptorは配列に入れてNSArrayに渡す | |
NSArray *sortDescArray; | |
sortDescArray = [NSArray arrayWithObjects:sortDescNumber, nil]; | |
// ソートの実行 | |
NSArray *sortArray; | |
sortArray = [timePeriodArray sortedArrayUsingDescriptors:sortDescArray]; |