100+ results results for 'NSString lang:ObjectiveC' (251 ms)
112#pragma mark - 观察者对应的方法 113- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context 114{ 144#pragma mark - 设置播放的视频 145- (void)setUrlString:(NSString *)urlString 146{ 309 310- (NSString *)timeString 311{ 397 398 NSString *durationString = [NSString stringWithFormat:@"%02ld:%02ld", dMin, dSec]; 399 NSString *currentString = [NSString stringWithFormat:@"%02ld:%02ld", cMin, cSec]; 436 437 NSString* emotionName = [NSString stringWithFormat:@"smile_%zd", arc4random_uniform(90)]; 438 UIImage* emotion = [UIImage imageNamed:emotionName];FBSDKAppEventsUtility.m https://gitlab.com/daniel.colceag/MonkeyNews | Objective C | 313 lines
154 155+ (void)ensureOnMainThread:(NSString *)methodName className:(NSString *)className 156{ 249{ 250 [[self class] ensureOnMainThread:NSStringFromSelector(_cmd) className:NSStringFromClass(self)]; 251 NSDictionary *data = @{ FBSDK_APPEVENTSUTILITY_ANONYMOUSID_KEY : anonymousID }; 259 260+ (NSString *)persistenceFilePath:(NSString *)filename 261{ 269{ 270 [[self class] ensureOnMainThread:NSStringFromSelector(_cmd) className:NSStringFromClass(self)]; 271 NSString *file = [[self class] persistenceFilePath:FBSDK_APPEVENTSUTILITY_ANONYMOUSIDFILENAME]; 271 NSString *file = [[self class] persistenceFilePath:FBSDK_APPEVENTSUTILITY_ANONYMOUSIDFILENAME]; 272 NSString *content = [[NSString alloc] initWithContentsOfFile:file 273 encoding:NSASCIIStringEncodingMacVim.m https://github.com/Brijen/macvim.git | Objective C | 368 lines
107 108NSString *MMLogLevelKey = @"MMLogLevel"; 109NSString *MMLogToStdErrKey = @"MMLogToStdErr"; 112// (techincally this is a user default but should not be used as such). 113NSString *MMNoWindowKey = @"MMNoWindow"; 114 114 115NSString *MMAutosaveRowsKey = @"MMAutosaveRows"; 116NSString *MMAutosaveColumnsKey = @"MMAutosaveColumns"; 116NSString *MMAutosaveColumnsKey = @"MMAutosaveColumns"; 117NSString *MMRendererKey = @"MMRenderer"; 118 119// Vim find pasteboard type (string contains Vim regex patterns) 120NSString *VimFindPboardType = @"VimFindPboardType"; 121BFTask.m https://gitlab.com/daniel.colceag/MonkeyNews | Objective C | 472 lines
21 22NSString *const BFTaskErrorDomain = @"bolts"; 23NSInteger const kBFMultipleErrorsError = 80175001; 23NSInteger const kBFMultipleErrorsError = 80175001; 24NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsException"; 25 446 447- (NSString *)description { 448 // Acquire the data from the locked properties 451 BOOL faulted; 452 NSString *resultDescription = nil; 453 457 faulted = self.faulted; 458 resultDescription = completed ? [NSString stringWithFormat:@" result = %@", self.result] : @""; 459 }TTDefaultCSSStyleSheet.m https://github.com/GetMoPix/three20.git | Objective C | 399 lines
28 29NSString* kDefaultCSSPath = @"extThree20CSSStyle.bundle/stylesheets/default.css"; 30 60 @"to your project. If you didn't, ensure that it's being copied in " 61 @"the 'Copy Bundle Resources' phase.", NSStringFromClass([self class])]; 62 return nil; 110/////////////////////////////////////////////////////////////////////////////////////////////////// 111- (BOOL)addStyleSheetFromDisk:(NSString*)filename ignoreCache:(BOOL)cache { 112 139/////////////////////////////////////////////////////////////////////////////////////////////////// 140- (BOOL)addStyleSheetFromDisk:(NSString*)filename { 141 return [self addStyleSheetFromDisk:filename ignoreCache:NO]; 151/////////////////////////////////////////////////////////////////////////////////////////////////// 152-(void)applyCssFromSelector:(NSString*)selectorName toObject:(id<TTCSSApplyProtocol>)anObject { 153 // Assert that the conforms with the protocol.TTCSSStyleSheet.m https://github.com/GetMoPix/three20.git | Objective C | 477 lines
36NSString* kCssPropertyFont = @"font"; 37NSString* kCssPropertyFontSize = @"font-size"; 38NSString* kCssPropertyFontWeight = @"font-weight"; 144 145 for (NSString* selector in styleSheet.cssStyles) { 146 NSDictionary* addingRuleSet = [styleSheet.cssStyles objectForKey:selector]; 235 NSMutableString *merged = [NSMutableString string]; 236 for ( NSString* part in object ) { 237 [merged appendString:part]; 241 } 242 else if ( [object isKindOfClass:[NSString class]] ) { 243 return object; 284/////////////////////////////////////////////////////////////////////////////////////////////////// 285- (NSString*)selector:(NSString*)selector forState:(UIControlState)state { 286 switch (state) {TTURLNavigatorPattern.m https://github.com/GetMoPix/three20.git | Objective C | 498 lines
26#import "Three20Core/TTDebug.h" 27#import "Three20Core/NSStringAdditions.h" 28 30 31static NSString* kUniversalURLPattern = @"*"; 32 94/////////////////////////////////////////////////////////////////////////////////////////////////// 95- (NSString *)description { 96 if (nil != _targetClass) { 96 if (nil != _targetClass) { 97 return [NSString stringWithFormat:@"%@ => %@", _URL, _targetClass]; 98 209 const char* selName = sel_getName(_selector); 210 NSString* selectorName = [[NSString alloc] initWithBytesNoCopy:(char*)selName 211 length:strlen(selName)TTURLMap.m https://github.com/GetMoPix/three20.git | Objective C | 537 lines
61 */ 62- (NSString*)keyForClass:(Class)cls withName:(NSString*)name { 63 const char* className = class_getName(cls); 261/////////////////////////////////////////////////////////////////////////////////////////////////// 262- (void)from:(NSString*)URL parent:(NSString*)parentURL 263 toSharedViewController:(id)target { 272/////////////////////////////////////////////////////////////////////////////////////////////////// 273- (void)from:(NSString*)URL parent:(NSString*)parentURL 274 toSharedViewController:(id)target selector:(SEL)selector { 313/////////////////////////////////////////////////////////////////////////////////////////////////// 314- (void)from:(NSString*)URL parent:(NSString*)parentURL 315 toModalViewController:(id)target selector:(SEL)selector transition:(NSInteger)transition { 355/////////////////////////////////////////////////////////////////////////////////////////////////// 356- (void)from:(Class)cls name:(NSString*)name toURL:(NSString*)URL { 357 TTURLGeneratorPattern* pattern = [[TTURLGeneratorPattern alloc] initWithTargetClass:cls];TTBaseNavigator.m https://github.com/GetMoPix/three20.git | Objective C | 1014 lines
44 45static NSString* kNavigatorHistoryKey = @"TTNavigatorHistory"; 46static NSString* kNavigatorHistoryTimeKey = @"TTNavigatorHistoryTime"; 46static NSString* kNavigatorHistoryTimeKey = @"TTNavigatorHistoryTime"; 47static NSString* kNavigatorHistoryImportantKey = @"TTNavigatorHistoryImportant"; 48 49#ifdef __IPHONE_4_0 50UIKIT_EXTERN NSString *const UIApplicationDidEnterBackgroundNotification 51__attribute__((weak_import)); 51__attribute__((weak_import)); 52UIKIT_EXTERN NSString *const UIApplicationWillEnterForegroundNotification 53__attribute__((weak_import)); 267 isContainer: (BOOL)isContainer 268 parentURLPath: (NSString*)parentURLPath { 269 if (controller == _rootViewController) {TTWebController.m https://github.com/GetMoPix/three20.git | Objective C | 461 lines
54/////////////////////////////////////////////////////////////////////////////////////////////////// 55- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { 56 self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 296- (BOOL)persistView:(NSMutableDictionary*)state { 297 NSString* URL = self.URL.absoluteString; 298 if (URL.length && ![URL isEqualToString:@"about:blank"]) { 309- (void)restoreView:(NSDictionary*)state { 310 NSString* URL = [state objectForKey:@"URL"]; 311 if (URL.length && ![URL isEqualToString:@"about:blank"]) {TTTextEditor.m https://github.com/GetMoPix/three20.git | Objective C | 486 lines
140 141 NSString* text = _textField.hidden ? _textView.text : _textField.text; 142 if (!text.length) { 406/////////////////////////////////////////////////////////////////////////////////////////////////// 407- (NSString*)text { 408 if (_textView && !_textView.hidden) { 417/////////////////////////////////////////////////////////////////////////////////////////////////// 418- (void)setText:(NSString*)text { 419 _textField.text = _textView.text = text; 426/////////////////////////////////////////////////////////////////////////////////////////////////// 427- (NSString*)placeholder { 428 return _textField.placeholder; 432/////////////////////////////////////////////////////////////////////////////////////////////////// 433- (void)setPlaceholder:(NSString*)placeholder { 434 _textField.placeholder = placeholder;TTTextBarController.m https://github.com/GetMoPix/three20.git | Objective C | 520 lines
40#import "Three20Core/TTCorePreprocessorMacros.h" 41#import "Three20Core/NSStringAdditions.h" 42#import "Three20Core/TTGlobalCore.h" 60/////////////////////////////////////////////////////////////////////////////////////////////////// 61- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { 62 self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 111/////////////////////////////////////////////////////////////////////////////////////////////////// 112- (void)showActivity:(NSString*)activityText { 113} 206 207 NSString* delegate = [[TTNavigator navigator] pathForObject:_delegate]; 208 if (delegate) { 212 213 NSString* title = self.navigationItem.title; 214TTTableViewController.m https://github.com/GetMoPix/three20.git | Objective C | 968 lines
68/////////////////////////////////////////////////////////////////////////////////////////////////// 69- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { 70 self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 121/////////////////////////////////////////////////////////////////////////////////////////////////// 122- (NSString*)defaultTitleForLoading { 123 return TTLocalizedString(@"Loading...", @""); 205/////////////////////////////////////////////////////////////////////////////////////////////////// 206- (void)fadingOutViewDidStop:(NSString*)animationID finished:(NSNumber*)finished 207 context:(void*)context { 214/////////////////////////////////////////////////////////////////////////////////////////////////// 215- (void)hideMenuAnimationDidStop:(NSString*)animationID finished:(NSNumber*)finished 216 context:(void*)context {TTStyledTextLabel.m https://github.com/GetMoPix/three20.git | Objective C | 538 lines
129 TTStyledBoxFrame* affectFrame = frame ? frame : _highlightedFrame; 130 NSString* className = affectFrame.element.className; 131 if (!className && [affectFrame.element isKindOfClass:[TTStyledLinkNode class]]) { 162/////////////////////////////////////////////////////////////////////////////////////////////////// 163- (NSString*)combineTextFromFrame:(TTStyledTextFrame*)fromFrame 164 toFrame:(TTStyledTextFrame*)toFrame {TTPostController.m https://github.com/GetMoPix/three20.git | Objective C | 621 lines
39#import "Three20Core/TTCorePreprocessorMacros.h" 40#import "Three20Core/NSStringAdditions.h" 41#import "Three20Core/TTGlobalCore.h" 59/////////////////////////////////////////////////////////////////////////////////////////////////// 60- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { 61 self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 120/////////////////////////////////////////////////////////////////////////////////////////////////// 121- (NSString*)stripWhitespace:(NSString*)text { 122 if (nil != text) { 170/////////////////////////////////////////////////////////////////////////////////////////////////// 171- (void)showActivity:(NSString*)activityText { 172 if (nil == _activityView) { 337 338 NSString* delegate = [[TTNavigator navigator] pathForObject:_delegate]; 339 if (delegate) {TTPickerTextField.m https://github.com/GetMoPix/three20.git | Objective C | 519 lines
31 32static NSString* kEmpty = @" "; 33static NSString* kSelected = @"`"; 186/////////////////////////////////////////////////////////////////////////////////////////////////// 187- (NSString*)labelForObject:(id)object { 188 NSString* label = nil; 191 } 192 return label ? label : [NSString stringWithFormat:@"%@", object]; 193} 252/////////////////////////////////////////////////////////////////////////////////////////////////// 253- (void)setText:(NSString*)text { 254 if (_dataSource) { 414 415 NSString* label = [self labelForObject:object]; 416TTPhotoViewController.m https://github.com/GetMoPix/three20.git | Objective C | 999 lines
72/////////////////////////////////////////////////////////////////////////////////////////////////// 73- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { 74 self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 210 } else { 211 self.title = [NSString stringWithFormat: 212 TTLocalizedString(@"%d of %d", @"Current page in photo browser (1 of 10)"), 339/////////////////////////////////////////////////////////////////////////////////////////////////// 340- (void)showStatus:(NSString*)status { 341 [_statusText release]; 362/////////////////////////////////////////////////////////////////////////////////////////////////// 363- (NSString*)URLForThumbnails { 364 if ([self.photoSource respondsToSelector:@selector(URLValueWithName:)]) { 375- (void)showThumbnails { 376 NSString* URL = [self URLForThumbnails]; 377 if (!_thumbsController) {TTMessageController.m https://github.com/GetMoPix/three20.git | Objective C | 801 lines
44#import "Three20Core/TTGlobalCoreRects.h" 45#import "Three20Core/NSStringAdditions.h" 46#import "Three20Core/TTGlobalCore.h" 62/////////////////////////////////////////////////////////////////////////////////////////////////// 63- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { 64 self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 407 408 NSString* body = self.body; 409 if (body) { 437 438 NSString* body = [state objectFTTButton.m https://github.com/GetMoPix/three20.git | Objective C | 487 lines
79/////////////////////////////////////////////////////////////////////////////////////////////////// 80+ (TTButton*)buttonWithStyle:(NSString*)selector { 81 TTButton* button = [[[self alloc] init] autorelease]; 87/////////////////////////////////////////////////////////////////////////////////////////////////// 88+ (TTButton*)buttonWithStyle:(NSString*)selector title:(NSString*)title { 89 TTButton* button = [[[self alloc] init] autorelease]; 103- (id)keyForState:(UIControlState)state { 104 static NSString* normalKey = @"normal"; 105 static NSString* highlighted = @"highlighted"; 105 static NSString* highlighted = @"highlighted"; 106 static NSString* selected = @"selected"; 107 static NSString* disabled = @"disabled"; 157/////////////////////////////////////////////////////////////////////////////////////////////////// 158- (NSString*)titleForCurrentState { 159 TTButtonContent* content = [self contentForCurrentState];TTURLRequestQueue.m https://github.com/GetMoPix/three20.git | Objective C | 703 lines
101 */ 102- (BOOL)dataExistsInBundle:(NSString*)URL { 103 NSString* path = TTPathForBundleResource([URL substringFromIndex:9]); 109/////////////////////////////////////////////////////////////////////////////////////////////////// 110- (BOOL)dataExistsInDocuments:(NSString*)URL { 111 NSString* path = TTPathForDocumentsResource([URL substringFromIndex:12]); 117/////////////////////////////////////////////////////////////////////////////////////////////////// 118- (NSData*)loadFromBundle:(NSString*)URL error:(NSError**)error { 119 NSString* path = TTPathForBundleResource([URL substringFromIndex:9]); 132/////////////////////////////////////////////////////////////////////////////////////////////////// 133- (NSData*)loadFromDocuments:(NSString*)URL error:(NSError**)error { 134 NSString* path = TTPathForDocumentsResource([URL substringFromIndex:12]); 147/////////////////////////////////////////////////////////////////////////////////////////////////// 148- (BOOL)loadFromCache: (NSString*)URL 149 cacheKey: (NSString*)cacheKeyTTURLCache.m https://github.com/GetMoPix/three20.git | Objective C | 708 lines
45 */ 46+ (NSString*)cachePathWithName:(NSString*)name; 47 271/////////////////////////////////////////////////////////////////////////////////////////////////// 272- (NSString*)loadEtagFromCacheWithKey:(NSString*)key { 273 NSString* path = [self etagCachePathForKey:key]; 337/////////////////////////////////////////////////////////////////////////////////////////////////// 338- (NSString*)cachePathForKey:(NSString*)key { 339 return [_cachePath stringByAppendingPathComponent:key]; 343/////////////////////////////////////////////////////////////////////////////////////////////////// 344- (NSString*)etagCachePathForKey:(NSString*)key { 345 return [self.etagCachePath stringByAppendingPathComponent:key]; 418 */ 419+ (NSString*)doubleImageURLPath:(NSString*)urlPath { 420 if ([[urlPath substringToIndex:1] isEqualToString:@"."]) {TTRequestLoader.m https://github.com/GetMoPix/three20.git | Objective C | 448 lines
100 // Strictly speaking, to be really conformant need to interpret %xx hex encoded entities. 101 // The [NSString dataUsingEncoding] doesn't do that correctly, but most documents don't use that. 102 // Skip for now.CoreAdditionTests.m https://github.com/GetMoPix/three20.git | Objective C | 574 lines
103 for (int unicode = 0x000A; unicode <= 0x000D; ++unicode) { 104 NSString* str = [NSString stringWithFormat:@"%C", unicode]; 105 STAssertTrue([str isWhitespaceAndNewlines], 108 109 NSString* str = [NSString stringWithFormat:@"%C", 0x0085]; 110 STAssertTrue([str isWhitespaceAndNewlines], @"Unicode string should be whitespace."); 132 for (int unicode = 0x000A; unicode <= 0x000D; ++unicode) { 133 NSString* str = [NSString stringWithFormat:@"%C", unicode]; 134 STAssertTrue(![str isEmptyOrWhitespace], 137 138 NSString* str = [NSString stringWithFormat:@"%C", 0x0085]; 139 STAssertTrue(![str isEmptyOrWhitespace], @"Unicode string should not be whitespace."); 148/////////////////////////////////////////////////////////////////////////////////////////////////// 149- (void)testNSString_stringByRemovingHTMLTags { 150 STAssertTrue([[@"" stringByRemovingHTMLTags] isEqualToString:@""], @"Empty case failed");Reachability.m https://github.com/HueMachine/iOS-boilerplate.git | Objective C | 814 lines
108 109NSString *const kInternetConnection = @"InternetConnection"; 110NSString *const kLocalWiFiConnection = @"LocalWiFiConnection"; 110NSString *const kLocalWiFiConnection = @"LocalWiFiConnection"; 111NSString *const kReachabilityChangedNotification = @"NetworkReachabilityChangedNotification"; 112 117 118static NSString *reachabilityFlags_(SCNetworkReachabilityFlags flags) { 119 120#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 30000) // Apple advises you to use the magic number instead of a symbol. 121 return [NSString stringWithFormat:@"Reachability Flags: %c%c %c%c%c%c%c%c%c", 122 (flags & kSCNetworkReachabilityFlagsIsWWAN) ? 'W' : '-', 133 // Compile out the v3.0 features for v2.2.1 deployment. 134 return [NSString stringWithFormat:@"Reachability Flags: %c%c %c%c%c%c%c%c", 135 (flags & kSCNetworkReachabilityFlagsIsWWAN) ? 'W' : '-',ASIHTTPRequest.m https://github.com/HueMachine/iOS-boilerplate.git | Objective C | 1416 lines
26// Automatically set on build 27NSString *ASIHTTPRequestVersion = @"v1.8.1-33 2011-08-20"; 28 28 29static NSString *defaultUserAgent = nil; 30 30 31NSString* const NetworkRequestErrorDomain = @"ASIHTTPRequestErrorDomain"; 32 32 33static NSString *ASIHTTPRequestRunLoopMode = @"ASIHTTPRequestRunLoopMode"; 34 177- (void)finishedDownloadingPACFile:(ASIHTTPRequest *)theRequest; 178- (void)runPACScript:(NSString *)script; 179- (void)timeOutPACRead;ASIDownloadCache.m https://github.com/HueMachine/iOS-boilerplate.git | Objective C | 514 lines
14 15static NSString *sessionCacheFolder = @"SessionStore"; 16static NSString *permanentCacheFolder = @"PermanentStore"; 20+ (NSString *)keyForURL:(NSURL *)url; 21- (NSString *)pathToFile:(NSString *)file; 22@end 204 // Grab the file extension, if there is one. We do this so we can save the cached response with the same file extension - this is important if you want to display locally cached data in a web view 205 NSString *extension = [[url path] pathExtension]; 206 225 226- (NSString *)pathToFile:(NSString *)file 227{ 428{ 429 NSString *cacheControl = [[[request responseHeaders] objectForKey:@"Cache-Control"] lowercaseString]; 430 if (cacheControl) {AFURLConnectionOperation.m https://bitbucket.org/af_1do/geolocation.git | Objective C | 855 lines
48 49static NSString * const kAFNetworkingLockName = @"com.alamofire.networking.operation.lock"; 50 50 51NSString * const AFNetworkingErrorDomain = @"AFNetworkingErrorDomain"; 52NSString * const AFNetworkingOperationFailingURLRequestErrorKey = @"AFNetworkingOperationFailingURLRequestErrorKey"; 52NSString * const AFNetworkingOperationFailingURLRequestErrorKey = @"AFNetworkingOperationFailingURLRequestErrorKey"; 53NSString * const AFNetworkingOperationFailingURLResponseErrorKey = @"AFNetworkingOperationFailingURLResponseErrorKey"; 54 54 55NSString * const AFNetworkingOperationDidStartNotification = @"com.alamofire.networking.operation.start"; 56NSString * const AFNetworkingOperationDidFinishNotification = @"com.alamofire.networking.operation.finish"; 283- (NSString *)description { 284 return [NSString stringWithFormat:@"<%@: %p, state: %@, cancelled: %@ request: %@, response: %@>", NSStringFromClass([self class]), self, AFKeyPathFromOperationState(self.state), ([self isCancelled] ? @"YES" : @"NO"), self.request, self.response]; 285}AFHTTPClient.m https://bitbucket.org/af_1do/geolocation.git | Objective C | 1270 lines
82 83static NSString * AFPercentEscapedQueryStringPairMemberFromStringWithEncoding(NSString *string, NSStringEncoding encoding) { 84 static NSString * const kAFCharactersToBeEscaped = @":/?&=;+!@#$()~',*"; 116 117- (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding { 118 if (!self.value || [self.value isEqual:[NSNull null]]) { 252 // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43 253 [self setDefaultHeader:@"User-Agent" value:[NSString stringWithFormat:@"%@/%@ (%@; iOS %@; Scale/%0.2f)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleIdentifierKey], (__bridge id)CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleVersionKey) ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], ([[UIScreen mainScreen] respondsToSelector:@selector(scale)] ? [[UIScreen mainScreen] scale] : 1.0f)]]; 254#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) 254#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) 255 [self setDefaultHeader:@"User-Agent" value:[NSString stringWithFormat:@"%@/%@ (Mac OS X %@)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleIdentifierKey], [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleVersionKey], [[NSProcessInfo processInfo] operatingSystemVersionString]]]; 256#endif 280- (NSString *)description { 281 return [NSString stringWithFormat:@"<%@: %p, baseURL: %@, defaultHeaders: %@, registeredOperationClasses: %@, operationQueue: %@>", NSStringFromClass([self class]), self, [self.baseURL absoluteString], self.defaultHeaders, self.registeredHTTPOperationClassNames, self.operationQueue]; 282}main.m https://bitbucket.org/sumidasignage/mupdf.git | Objective C | 1661 lines
102} 103- (id) initWithFilename: (NSString*)nsfilename document: (fz_document *)aDoc; 104- (void) createPageView: (int)number; 155 156static void showAlert(NSString *msg, NSString *filename) 157{ 181 { 182 NSString *title = [NSString stringWithUTF8String: outline->title]; 183 [titles addObject: [NSString stringWithFormat: @"%s%@", indent, title]]; 328 NSFileManager *fileman = [NSFileManager defaultManager]; 329 NSString *docdir = [NSString stringWithFormat: @"%@/Documents", NSHomeDirectory()]; 330 NSMutableArray *outfiles = [[NSMutableArray alloc] init]; 391 int row = [sender tag]; 392 NSString *title = [NSString stringWithFormat: @"Delete %@?", [files objectAtIndex: row - 1]]; 393 UIActionSheet *sheet = [[UIActionSheet alloc]UVWelcomeViewController.m https://github.com/appsocial/uservoice-iphone-sdk.git | Objective C | 478 lines
39 40- (NSString *)backButtonTitle { 41 return @"Welcome"; 71 if (buttonIndex == alertView.firstOtherButtonIndex) { 72 NSString *url = [NSString stringWithFormat:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@", 73 [UVSession currentSession].clientConfig.itunesApplicationId]; 130 131- (CGFloat)heightForViewWithHeader:(NSString *)header subheader:(NSString *)subheader 132{ 161 [myButton addTarget:self action:@selector(pushNewTicketView) forControlEvents:UIControlEventTouchUpInside]; 162 [myButton setTitle:[NSString stringWithFormat:@"Contact %@", [UVSession currentSession].clientConfig.subdomain.name] 163 forState:UIControlStateNormal]; 262 263- (UIView *)viewWithHeader:(NSString *)header subheader:(NSString *)subheader { 264 CGFloat height = [self heightForViewWithHeader:header subheader:subheader];UVTextEditor.m https://github.com/appsocial/uservoice-iphone-sdk.git | Objective C | 582 lines
150- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range 151 replacementText:(NSString *)text { 152 if ([text isEqualToString:@"\n"]) { 217- (BOOL)textField:(UITextField*)textField shouldChangeCharactersInRange:(NSRange)range 218replacementString:(NSString*)string { 219 BOOL shouldChange = YES; 299 300 NSString* text = _textField.hidden ? _textView.text : _textField.text; 301 if (!text.length) {UVSuggestionListViewController.m https://github.com/appsocial/uservoice-iphone-sdk.git | Objective C | 523 lines
61 62- (NSString *)backButtonTitle { 63 return @"Ideas"; 176 UIFont *font = [UIFont boldSystemFontOfSize:18]; 177 NSString *text = [NSString stringWithFormat:@"Add \"%@\"", _textEditor.text]; 178 CGSize size = [text sizeWithFont:font forWidth:260 lineBreakMode:UILineBreakModeTailTruncation]; 201- (UITableViewCell *)tableView:(UITableView *)theTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 202 NSString *identifier; 203 BOOL selectable = YES;UVSuggestionDetailsViewController.m https://github.com/appsocial/uservoice-iphone-sdk.git | Objective C | 570 lines
45 46- (NSString *)backButtonTitle { 47 return @"Idea"; 149 150- (NSString *)postDateString { 151 static NSDateFormatter* dateFormatter = nil; 189 label.font = [UIFont systemFontOfSize:14]; 190 label.text = [NSString stringWithFormat: 191 @"Voting for this suggestion is now closed and your %d %@ been returned to you", 264- (void)customizeCellForStatus:(UITableViewCell *)cell indexPath:(NSIndexPath *)indexPath { 265 NSString *status = suggestion.status ? suggestion.status : @"N/A"; 266 cell.textLabel.text = [NSString stringWithFormat:@"Status: %@", [status capitalizedString]]; 277- (void)customizeCellForComments:(UITableViewCell *)cell indexPath:(NSIndexPath *)indexPath { 278 cell.textLabel.text = [NSString stringWithFormat:(self.suggestion.commentsCount == 1 ? @"%d Comment" : @"%d Comments"), self.suggestion.commentsCount]; 279 cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;UVNewSuggestionViewController.m https://github.com/appsocial/uservoice-iphone-sdk.git | Objective C | 618 lines
48 49- (id)initWithForum:(UVForum *)theForum title:(NSString *)theTitle { 50 if (self = [super init]) { 141 142 NSString *msg = [NSString stringWithFormat:@"Your idea \"%@\" was successfully created.", self.title]; 143 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Success" 299 300- (UITextField *)customizeTextFieldCell:(UITableViewCell *)cell label:(NSString *)label placeholder:(NSString *)placeholder { 301 cell.textLabel.text = label;UVCommentListViewController.m https://github.com/appsocial/uservoice-iphone-sdk.git | Objective C | 446 lines
45 46- (NSString *)backButtonTitle { 47 return @"Comments"; 66 } else { 67 self.navigationItem.title = [NSString stringWithFormat:@"%d Comments", self.suggestion.commentsCount]; 68 } 253 NSInteger days = ABS([comment.createdAt timeIntervalSinceNow]) / (60 * 60 * 24); 254 NSString *daysAgo = [NSString stringWithFormat:@"%d days ago", days]; 255 UVUserButton *userButton = (UVUserButton *)[cell.contentView viewWithTag:UV_COMMENT_LIST_TAG_CELL_NAME]; 301- (UITableViewCell *)tableView:(UITableView *)theTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 302 NSString *identifier; 303 UITableViewCellStyle style = UITableViewCellStyleDefault; 365 } else { 366 self.navigationItem.title = [NSString stringWithFormat:@"%d Comments", self.suggestion.commentsCount]; 367 }CCTextureCache.m https://bitbucket.org/stavrossk/ipong.git | Objective C | 462 lines
43 44//static NSString* loadHiResImage( NSString* path ) 45//{ 45//{ 46// NSString *newPath = nil; 47// 49// { 50// NSString *path2x = [path stringByReplacingCharactersInRange:NSMakeRange([path length] - 4, 0) withString:@"@2x"]; 51// newPath = [[UIImage alloc] initWithContentsOfFile:path2x]; 127 128- (NSString*) description 129{ 129{ 130 return [NSString stringWithFormat:@"<%@ = %08X | num of textures = %i>", [self class], self, [textures_ count]]; 131}CCTextureCache.m https://github.com/jdxyw/Tutorial.git | Objective C | 498 lines
110 111- (NSString*) description 112{ 112{ 113 return [NSString stringWithFormat:@"<%@ = %08X | num of textures = %i | keys: %@>", 114 [self class], 212 213-(void) addImageAsync: (NSString*)path target:(id)target selector:(SEL)selector 214{ 238 239-(CCTexture2D*) addImage: (NSString*) path 240{ 255 256 NSString *lowerCase = [path lowercaseString]; 257 // all images are handled by UIImage except PVR extension that is handled by our own handlerCCDirector.m https://bitbucket.org/stavrossk/ipong.git | Objective C | 594 lines
65 66extern NSString * cocos2dVersion(void); 67 540 541 NSString *str = [[NSString alloc] initWithFormat:@"%.1f", frameRate_]; 542 [FPSLabel_ setString:str]; 561 562 NSString *str = [NSString stringWithFormat:@"%.2f",frameRate_]; 563 CCTexture2D *texture = [[CCTexture2D alloc] initWithString:str dimensions:CGSizeMake(100,30) alignment:UITextAlignmentLeft fontName:@"Arial" fontSize:24];CastViewController.m https://gitlab.com/adam.lukaitis/io2015-codelabs | Objective C | 648 lines
26 27static NSString * const kListTracks = @"listTracks"; 28static NSString * const kListTracksPopover = @"listTracksPopover"; 28static NSString * const kListTracksPopover = @"listTracksPopover"; 29NSString * const kCastComponentPosterURL = @"castComponentPosterURL"; 30 95 96 self.castingToLabel.text = [NSString stringWithFormat:NSLocalizedString(@"Casting to %@", nil), 97 _castDeviceController.deviceManager.device.friendlyName]; 99 100 self.volumeControlLabel.text = [NSString stringWithFormat:NSLocalizedString(@"%@ Volume", nil), 101 _castDeviceController.deviceManager.device.friendlyName]; 322// Little formatting option here 323- (NSString*)getFormattedTime:(NSTimeInterval)timeInSeconds { 324 int seconds = round(timeInSeconds);CDVSound.m https://gitlab.com/dannywillems/cordova-plugin-media | Objective C | 891 lines
102 // see if this exists in the documents/temp directory from a previous recording 103 NSString* testPath = [NSString stringWithFormat:@"%@/%@", [NSTemporaryDirectory()stringByStandardizingPath], resourcePath]; 104 if ([[NSFileManager defaultManager] fileExistsAtPath:testPath]) { 132// Creates or gets the cached audio file resource object 133- (CDVAudioFile*)audioFileForResource:(NSString*)resourcePath withId:(NSString*)mediaId doValidation:(BOOL)bValidate forRecording:(BOOL)bRecord 134{ 175 if (bError) { 176 jsString = [NSString stringWithFormat:@"%@(\"%@\",%d,%@);", @"cordova.require('cordova-plugin-media.Media').onStatus", mediaId, MEDIA_ERROR, [self createMediaErrorWithCode:errcode message:errMsg]]; 177 [self.commandDelegate evalJs:jsString]; 202// helper function to create a error object string 203- (NSString*)createMediaErrorWithCode:(CDVMediaError)code message:(NSString*)message 204{ 222 NSString* errorMessage = [NSString stringWithFormat:@"Failed to initialize Media file with path %@", resourcePath]; 223 NSString* jsString = [NSString stringWithFormat:@"%@(\"%@\",%d,%@);", @"cordova.require('cordova-plugin-media.Media').onStatus", mediaId, MEDIA_ERROR, [self createMediaErrorWithCode:MEDIA_ERR_ABORTED message:errorMessage]]; 224 [self.commandDelegate evalJs:jsString];MBProgressHUD.m https://gitlab.com/dannywillems/cordova-activityindicator | Objective C | 1017 lines
34 #define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \ 35 boundingRectWithSize:maxSize options:(NSStringDrawingUsesLineFragmentOrigin) \ 36 attributes:@{NSFontAttributeName:font} context:nil].size : CGSizeZero; 55- (void)unregisterFromNotifications; 56- (void)updateUIForKeypath:(NSString *)keyPath; 57- (void)hideUsingAnimation:(BOOL)animated; 359 360- (void)animationFinished:(NSString *)animationID finished:(BOOL)finished context:(void*)context { 361 [self done];DDXMLNode.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1976 lines
99 100+ (id)elementWithName:(NSString *)name URI:(NSString *)URI 101{ 104 105+ (id)attributeWithName:(NSString *)name stringValue:(NSString *)stringValue 106{ 113 114+ (id)attributeWithName:(NSString *)name URI:(NSString *)URI stringValue:(NSString *)stringValue 115{ 137 138+ (id)processingInstructionWithName:(NSString *)name stringValue:(NSString *)stringValue 139{ 485 486 NSString *result = [NSString stringWithUTF8String:(const char *)content]; 487DDXMLElement.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 801 lines
71 72- (id)initWithName:(NSString *)name URI:(NSString *)URI 73{ 87 88- (id)initWithName:(NSString *)name stringValue:(NSString *)string 89{ 221 { 222 NSString *uri = [NSString stringWithUTF8String:((const char *)ns->href)]; 223 return [self _elementsForName:name localName:localName prefix:prefix uri:uri]; 229 230- (NSArray *)elementsForLocalName:(NSString *)localName URI:(NSString *)uri 231{ 243 { 244 NSString *name = [NSString stringWithFormat:@"%@:%@", prefix, localName]; 245DDTTYLogger.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1480 lines
102 NSUInteger fgCodeIndex; 103 NSString *fgCodeRaw; 104 105 NSUInteger bgCodeIndex; 106 NSString *bgCodeRaw; 107DDFileLogger.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1380 lines
221 NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES); 222 NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : NSTemporaryDirectory(); 223 NSString *logsDirectory = [[basePath stringByAppendingPathComponent:@"Logs"] stringByAppendingPathComponent:appName]; 280{ 281 NSString *logsDirectory = [self logsDirectory]; 282 NSArray *fileNames = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:logsDirectory error:nil]; 400 CFStringRef fullStr = CFUUIDCreateString(NULL, uuid); 401 NSString *result = (__bridge_transfer NSString *)CFStringCreateWithSubstring(NULL, fullStr, CFRangeMake(0, 6)); 402 418 { 419 NSString *fileName = [NSString stringWithFormat:@"log-%@.txt", [self generateShortUUID]]; 420 472 473 return [NSString stringWithFormat:@"%@ %@", dateAndTime, logMessage->logMsg]; 474}GCDAsyncSocket.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1831 lines
127 128NSString *const GCDAsyncSocketException = @"GCDAsyncSocketException"; 129NSString *const GCDAsyncSocketErrorDomain = @"GCDAsyncSocketErrorDomain"; 130 131NSString *const GCDAsyncSocketQueueName = @"GCDAsyncSocket"; 132NSString *const GCDAsyncSocketThreadName = @"GCDAsyncSocket-CFStream"; 134#if SECURE_TRANSPORT_MAYBE_AVAILABLE 135NSString *const GCDAsyncSocketSSLCipherSuites = @"GCDAsyncSocketSSLCipherSuites"; 136#if TARGET_OS_IPHONE 136#if TARGET_OS_IPHONE 137NSString *const GCDAsyncSocketSSLProtocolVersionMin = @"GCDAsyncSocketSSLProtocolVersionMin"; 138NSString *const GCDAsyncSocketSSLProtocolVersionMax = @"GCDAsyncSocketSSLProtocolVersionMax"; 139#else 140NSString *const GCDAsyncSocketSSLDiffieHellmanParameters = @"GCDAsyncSocketSSLDiffieHellmanParameters"; 141#endifXMPPSRVResolver.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 706 lines
43 44NSString *const XMPPSRVResolverErrorDomain = @"XMPPSRVResolverErrorDomain"; 45 123 124- (NSString *)srvName 125{ 125{ 126 __block NSString *result = nil; 127 306 { 307 XMPPLogWarn(@"%@: delegate doesn't implement %@", THIS_FILE, NSStringFromSelector(selector)); 308 } 334 { 335 XMPPLogWarn(@"%@: delegate doesn't implement %@", THIS_FILE, NSStringFromSelector(selector)); 336 }XMPPStream.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1956 lines
71 72NSString *const XMPPStreamErrorDomain = @"XMPPStreamErrorDomain"; 73NSString *const XMPPStreamDidChangeMyJIDNotification = @"XMPPStreamDidChangeMyJID"; 125 126 NSString *hostName; 127 UInt16 hostPort; 165- (void)continueStartTLS:(NSMutableDictionary *)settings; 166- (void)continueHandleBinding:(NSString *)alternativeResource; 167- (void)setupKeepAliveTimer; 333 334- (NSString *)hostName 335{ 559 560 NSString *keepAliveString = [[NSString alloc] initWithData:keepAliveData encoding:NSUTF8StringEncoding]; 561 if ([keepAliveString length] > 0)XMPPParser.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 875 lines
166 167 NSString *elementName = [[NSString alloc] initWithFormat:@"%@:%@", prefix, name]; 168 [element setName:elementName]; 172 { 173 NSString *elementName = [[NSString alloc] initWithUTF8String:(const char *)node->name]; 174 [element setName:elementName]; 230 { 231 NSString *value = [[NSString alloc] initWithUTF8String:(const char *)childNode->content]; 232 [element setStringValue:value]; 267 NSString *prefix = [[NSString alloc] initWithUTF8String:(const char *)attrNode->ns->prefix]; 268 NSString *name = [[NSString alloc] initWithUTF8String:(const char *)attrNode->name]; 269 269 270 NSString *attrName = [[NSString alloc] initWithFormat:@"%@:%@", prefix, name]; 271 [attr setName:attrName];NSDate+ISO8601Parsing.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 655 lines
169 */ 170+ (NSDate *)dateWithString:(NSString *)str strictly:(BOOL)strict timeSeparator:(unichar)timeSep getRange:(out NSRange *)outRange { 171 NSCalendar *gregorian = [[NSCalendar alloc]LocalTime.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1018 lines
24} 25- (xmlNodePtr)xmlNodeForDoc:(xmlDocPtr)doc elementName:(NSString *)elName elementNSPrefix:(NSString *)elNSPrefix 26{ 98 } else { 99 NSString *elementTypeString = [NSString stringWithCString:(char*)instanceType encoding:NSUTF8StringEncoding]; 100 221 } else { 222 NSString *elementTypeString = [NSString stringWithCString:(char*)instanceType encoding:NSUTF8StringEncoding]; 223 232 233 NSString *standardPrefix = [[USGlobals sharedInstance].wsdlStandardNamespaces objectForKey:[NSString stringWithCString:(char*)elementNamespace->href encoding:NSUTF8StringEncoding]]; 234 331} 332- (void)sendHTTPCallUsingBody:(NSString *)outputBody soapAction:(NSString *)soapAction forOperation:(LocalTimeSoapBindingOperation *)operation 333{MBProgressHUD.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 659 lines
14- (void)done; 15- (void)updateLabelText:(NSString *)newText; 16- (void)updateDetailsLabelText:(NSString *)newText; 86 87- (void)setLabelText:(NSString *)newText { 88 if ([NSThread isMainThread]) { 98 99- (NSString *)labelText { 100 return labelText; 102 103- (void)setDetailsLabelText:(NSString *)newText { 104 if ([NSThread isMainThread]) { 114 115- (NSString *)detailsLabelText { 116 return detailsLabelText;MBProgressHUD.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 756 lines
33- (void)unregisterFromNotifications; 34- (void)updateUIForKeypath:(NSString *)keyPath; 35- (void)hideUsingAnimation:(BOOL)animated; 318 319- (void)animationFinished:(NSString *)animationID finished:(BOOL)finished context:(void*)context { 320 [self done];AppDelegate.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 456 lines
72 73 NSString *tempFile = [[[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"The Great American Novel.txt.download"]; 74 if ([[NSFileManager defaultManager] fileExistsAtPath:tempFile]) { 113{ 114 [fileLocation setStringValue:[NSString stringWithFormat:@"File downloaded to %@",[request downloadDestinationPath]]]; 115 [startButton setTitle:@"Start"]; 123 } else { 124 [fileLocation setStringValue:[NSString stringWithFormat:@"An error occurred: %@",[[request error] localizedDescription]]]; 125 [startButton setTitle:@"Start"]; 169{ 170 [bandwidthUsed setStringValue:[NSString stringWithFormat:@"%luKB / second",[ASIHTTPRequest averageBandwidthUsedPerSecond]/1024]]; 171} 282 NSMutableData *data = [NSMutableData dataWithLength:1024*1024]; 283 NSString *path = [[[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"bigfile"]; 284 [data writeToFile:path atomically:NO];ASIS3RequestTests.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 860 lines
16// Fill in these to run the tests that actually connect and manipulate objects on S3 17static NSString *secretAccessKey = @""; 18static NSString *accessKey = @""; 20// You should run these tests on a bucket that does not yet exist 21static NSString *bucket = @""; 22 51{ 52 NSString *exampleSecretAccessKey = @"uV3F3YluFJax1cknvbcGwgjvx4QpvB+leU8dUj2o"; 53 NSString *exampleAccessKey = @"0PN5J17HBGZHT7JJ3X82"; 53 NSString *exampleAccessKey = @"0PN5J17HBGZHT7JJ3X82"; 54 NSString *exampleBucket = @"johnsmith"; 55 56 // Test list all my buckets 57 NSString *dateString = @"Wed, 28 Mar 2007 01:29:59 +0000"; 58 ASIS3ServiceRequest *serviceRequest = [ASIS3ServiceRequest serviceRequest];ASIHTTPRequestTests.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1152 lines
61 [request startSynchronous]; 62 NSString *html = [request responseString]; 63 GHAssertNotNil(html,@"Basic synchronous request failed"); 65 // Check we're getting the correct response headers 66 NSString *pingBackHeader = [[request responseHeaders] objectForKey:@"X-Pingback"]; 67 BOOL success = [pingBackHeader isEqualToString:@"http://allseeing-i.com/Ping-Back"]; 97 NSData *data = [@"Hello, world" dataUsingEncoding:NSUTF8StringEncoding]; 98 NSString *base64 = [ASIHTTPRequest base64forData:data]; 99 BOOL success = [base64 isEqualToString:@"SGVsbG8sIHdvcmxk"]; 248 249 NSString *etag = [[request responseHeaders] objectForKey:@"Etag"]; 250 NSString *lastModified = [[request responseHeaders] objectForKey:@"Last-Modified"]; 281 NSArray *IANAEncodings = [NSArray arrayWithObjects:@"UTF-8",@"US-ASCII",@"ISO-8859-1",@"UTF-16",nil]; 282 NSUInteger NSStringEncodings[] = {NSUTF8StringEncoding,NSASCIIStringEncoding,NSISOLatin1StringEncoding,NSUnicodeStringEncoding}; 283ASIDownloadCacheTests.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 562 lines
175 176 NSString *path = [[ASIDownloadCache sharedCache] pathToStoreCachedResponseDataForRequest:request]; 177 success = (path != nil); 228 for (NSString *cacheType in cacheHeaders) { 229 NSString *url = [NSString stringWithFormat:@"http://allseeing-i.com/ASIHTTPRequest/tests/%@",cacheType]; 230 ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:url]]; 268 NSArray *headers = [NSArray arrayWithObjects:@"last-modified",@"etag",@"expires",@"max-age",nil]; 269 for (NSString *header in headers) { 270 ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://allseeing-i.com/ASIHTTPRequest/tests/content-always-new/%@",header]]]; 277 278 request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://allseeing-i.com/ASIHTTPRequest/tests/content-always-new/%@",header]]]; 279 [request setDownloadCache:[ASIDownloadCache sharedCache]]; 303 NSArray *extensions = [ASIDownloadCache fileExtensionsToHandleAsHTML]; 304 for (NSString *extension in extensions) { 305 NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://allseeing-i.com/file.%@",extension]];ASIWebPageRequest.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 722 lines
31+ (NSArray *)CSSURLsFromString:(NSString *)string; 32- (NSString *)relativePathTo:(NSString *)destinationPath fromPath:(NSString *)sourcePath; 33 88 webContentType = ASINotParsedWebContentType; 89 NSString *contentType = [[[self responseHeaders] objectForKey:@"Content-Type"] lowercaseString]; 90 contentType = [[contentType componentsSeparatedByString:@";"] objectAtIndex:0]; 105 106 NSString *responseCSS = nil; 107 NSError *err = nil; 108 if ([self downloadDestinationPath]) { 109 responseCSS = [NSString stringWithContentsOfFile:[self downloadDestinationPath] encoding:[self responseEncoding] error:&err]; 110 } else { 123 124 for (NSString *theURL in urls) { 125 [self addURLToFetch:theURL];ASIHTTPRequest.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1398 lines
26// Automatically set on build 27NSString *ASIHTTPRequestVersion = @"v1.8.1-61 2011-09-19"; 28 28 29static NSString *defaultUserAgent = nil; 30 30 31NSString* const NetworkRequestErrorDomain = @"ASIHTTPRequestErrorDomain"; 32 32 33static NSString *ASIHTTPRequestRunLoopMode = @"ASIHTTPRequestRunLoopMode"; 34 177- (void)finishedDownloadingPACFile:(ASIHTTPRequest *)theRequest; 178- (void)runPACScript:(NSString *)script; 179- (void)timeOutPACRead;ForAndroid.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1603 lines
28} 29- (xmlNodePtr)xmlNodeForDoc:(xmlDocPtr)doc elementName:(NSString *)elName elementNSPrefix:(NSString *)elNSPrefix 30{ 143 } else { 144 NSString *elementTypeString = [NSString stringWithCString:(char*)instanceType encoding:NSUTF8StringEncoding]; 145 346} 347- (xmlNodePtr)xmlNodeForDoc:(xmlDocPtr)doc elementName:(NSString *)elName elementNSPrefix:(NSString *)elNSPrefix 348{ 419} 420- (xmlNodePtr)xmlNodeForDoc:(xmlDocPtr)doc elementName:(NSString *)elName elementNSPrefix:(NSString *)elNSPrefix 421{ 493 } else { 494 NSString *elementTypeString = [NSString stringWithCString:(char*)instanceType encoding:NSUTF8StringEncoding]; 495SBJsonParser.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 516 lines
69 70- (id)objectWithString:(NSString *)repr { 71 [self clearErrorTrace]; 102 103- (id)objectWithString:(NSString*)repr error:(NSError**)error { 104 id tmp = [self objectWithString:repr]; 263 if (![self scanValue:&v]) { 264 NSString *string = [NSString stringWithFormat:@"Object value expected for key: %@", k]; 265 [self addErrorWithCode:EPARSE description: string]; 302 // check for 303 id t = [[NSString alloc] initWithBytesNoCopy:(char*)c 304 length:len 340 default: 341 [self addErrorWithCode:EESCAPE description: [NSString stringWithFormat:@"Illegal escape sequence '0x%x'", uc]]; 342 return NO;ControlsViewController.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 414 lines
58 59static NSString *kSectionTitleKey = @"sectionTitleKey"; 60static NSString *kLabelKey = @"labelKey"; 60static NSString *kLabelKey = @"labelKey"; 61static NSString *kSourceKey = @"sourceKey"; 62static NSString *kViewKey = @"viewKey"; 64// tableView cell id constants 65static NSString *kDisplayCellID = @"DisplayCellID"; 66static NSString *kSourceCellID = @"SourceCellID"; 155 156- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section 157{ButtonsViewController.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 447 lines
55 56static NSString *kSectionTitleKey = @"sectionTitleKey"; 57static NSString *kLabelKey = @"labelKey"; 57static NSString *kLabelKey = @"labelKey"; 58static NSString *kSourceKey = @"sourceKey"; 59static NSString *kViewKey = @"viewKey"; 61// tableView cell id constants 62static NSString *kDisplayCellID = @"DisplayCellID"; 63static NSString *kSourceCellID = @"SourceCellID"; 151 152- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section 153{ 220 221+ (UIButton *)newButtonWithTitle:(NSString *)title 222 target:(id)targetControlsViewController.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 453 lines
58 59static NSString *kSectionTitleKey = @"sectionTitleKey"; 60static NSString *kLabelKey = @"labelKey"; 60static NSString *kLabelKey = @"labelKey"; 61static NSString *kSourceKey = @"sourceKey"; 62static NSString *kViewKey = @"viewKey"; 201 202- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section 203{ 227 { 228 static NSString *kDisplayCell_ID = @"DisplayCellID"; 229 cell = [self.tableView dequeueReusableCellWithIdentifier:kDisplayCell_ID]; 250 { 251 static NSString *kSourceCellID = @"SourceCellID"; 252 cell = [self.tableView dequeueReusableCellWithIdentifier:kSourceCellID];ListController.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 618 lines
72@property (nonatomic, retain) NSMutableArray * listEntries; 73@property (nonatomic, copy) NSString * status; 74 74 75- (void)_updateStatus:(NSString *)statusString; 76 95 96- (void)_updateStatus:(NSString *)statusString 97{ 110 111- (void)_receiveDidStopWithStatus:(NSString *)statusString 112{ 181 182- (void)_stopReceiveWithStatus:(NSString *)statusString 183 // Shuts down the connection and displays the result (statusString == nil)FMDatabase.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 761 lines
5 6+ (id)databaseWithPath:(NSString*)aPath { 7 return [[[self alloc] initWithPath:aPath] autorelease]; 9 10- (id)initWithPath:(NSString*)aPath { 11 self = [super init]; 32 33+ (NSString*)sqliteLibVersion { 34 return [NSString stringWithFormat:@"%s", sqlite3_libversion()]; 36 37- (NSString *)databasePath { 38 return databasePath; 111 112- (FMStatement*)cachedStatementForQuery:(NSString*)query { 113 return [cachedStatements objectForKey:query];MGLine.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 552 lines
47 48+ (id)multilineWithText:(NSString *)text font:(UIFont *)font width:(CGFloat)width 49 padding:(UIEdgeInsets)padding { 105 106 // wrap NSStrings and UIImages 107 [self wrapRawContents:self.leftItems align:NSTextAlignmentLeft]; 155 id item = contents[i]; 156 if ([item isKindOfClass:NSString.class]) { 157 UILabel *label = [self makeLabel:item align:align]; 428 429- (UILabel *)makeLabel:(NSString *)text 430 align:(UITextAlignment)align {UIColor+MGExpanded.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 618 lines
21 22- (NSString *)styleString; 23 28 29+ (UIColor *)searchForColorByName:(NSString *)cssColorName; 30 40 41- (NSString *)colorSpaceString { 42 switch (self.colorSpaceModel) { 379 380- (NSString *)stringFromColor { 381 NSAssert(self.canProvideRGBComponents, @"Must be an RGB color to use -stringFromColor"); 381 NSAssert(self.canProvideRGBComponents, @"Must be an RGB color to use -stringFromColor"); 382 NSString *result; 383 switch (self.colorSpaceModel) {MGLine.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 867 lines
56 57+ (id)lineWithMultilineLeft:(NSString *)left right:(id)right width:(CGFloat)width 58 minHeight:(CGFloat)height { 66 67+ (id)lineWithLeft:(id)left multilineRight:(NSString *)right width:(CGFloat)width 68 minHeight:(CGFloat)height { 76 77+ (id)multilineWithText:(NSString *)text font:(UIFont *)font width:(CGFloat)width 78 padding:(UIEdgeInsets)padding { 118 119 // wrap NSStrings, NSAttributedStrings, and UIImages 120 [self wrapRawContents:self.leftItems placement:MGLeft]; 188 id item = items[i]; 189 if ([item isKindOfClass:NSString.class] 190 || [item isKindOfClass:NSAttributedString.class]) {CC3GLMatrix.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1045 lines
220 221-(NSString*) description { 222 GLfloat* m = self.glMatrix;CC3Foundation.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 570 lines
36 37NSString* NSStringFromCC3Vector(CC3Vector v) { 38 return [NSString stringWithFormat: @"(%.3f, %.3f, %.3f)", v.x, v.y, v.z]; 173 174NSString* NSStringFromCC3AngularVector(CC3AngularVector av) { 175 return [NSString stringWithFormat: @"(%.3f, %.3f, %.3f)", av.heading, av.inclination, av.radius]; 223 224NSString* NSStringFromCC3Vector4(CC3Vector4 v) { 225 return [NSString stringWithFormat: @"(%.3f, %.3f, %.3f, %.3f)", v.x, v.y, v.z, v.w]; 363 364NSString* NSStringFromCC3Plane(CC3Plane p) { 365 return [NSString stringWithFormat: @"(%.3f, %.3f, %.3f, %.3f)", p.a, p.b, p.c, p.d]; 456 457NSString* NSStringFromCCC4F(ccColor4F rgba) { 458 return [NSString stringWithFormat: @"(%.2f, %.2f, %.2f, %.2f)", rgba.r, rgba.g, rgba.b, rgba.a];PTPusher.m https://gitlab.com/trungminhnt/sampleShinobi | Objective C | 458 lines
28 29NSURL *PTPusherConnectionURL(NSString *host, NSString *key, NSString *clientID, BOOL secure); 30 41 42NSURL *PTPusherConnectionURL(NSString *host, NSString *key, NSString *clientID, BOOL encrypted) 43{ 102{ 103 return [self pusherWithKey:(NSString *)key delegate:(id<PTPusherDelegate>)delegate encrypted:(BOOL)isEncrypted cluster:(NSString *) nil]; 104} 105 106+ (instancetype)pusherWithKey:(NSString *)key delegate:(id<PTPusherDelegate>)delegate encrypted:(BOOL)isEncrypted cluster:(NSString *) cluster 107{ 283 284- (void)sendEventNamed:(NSString *)name data:(id)data channel:(NSString *)channelName 285{SRWebSocket.m https://gitlab.com/trungminhnt/sampleShinobi | Objective C | 1511 lines
71 72static NSString *const SRWebSocketAppendToSecKeyString = @"258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; 73 74static inline int32_t validate_dispatch_data_partial_string(NSData *data); 75static inline void SRFastLog(NSString *format, ...); 76 78 79- (NSString *)stringBySHA1ThenBase64Encoding; 80 83 84@interface NSString (SRWebSocket) 85 85 86- (NSString *)stringBySHA1ThenBase64Encoding; 87AFURLSessionManager.m https://gitlab.com/trungminhnt/sampleShinobi | Objective C | 1133 lines
56 57NSString * const AFNetworkingTaskDidResumeNotification = @"com.alamofire.networking.task.resume"; 58NSString * const AFNetworkingTaskDidCompleteNotification = @"com.alamofire.networking.task.complete"; 58NSString * const AFNetworkingTaskDidCompleteNotification = @"com.alamofire.networking.task.complete"; 59NSString * const AFNetworkingTaskDidSuspendNotification = @"com.alamofire.networking.task.suspend"; 60NSString * const AFURLSessionDidInvalidateNotification = @"com.alamofire.networking.session.invalidate"; 60NSString * const AFURLSessionDidInvalidateNotification = @"com.alamofire.networking.session.invalidate"; 61NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification = @"com.alamofire.networking.session.download.file-manager-error"; 62 62 63NSString * const AFNetworkingTaskDidStartNotification = @"com.alamofire.networking.task.resume"; // Deprecated 64NSString * const AFNetworkingTaskDidFinishNotification = @"com.alamofire.networking.task.complete"; // Deprecated 65 66NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey = @"com.alamofire.networking.task.complete.serializedresponse"; 67NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey = @"com.alamofire.networking.task.complete.responseserializer";AFURLResponseSerialization.m https://gitlab.com/trungminhnt/sampleShinobi | Objective C | 825 lines
31 32NSString * const AFURLResponseSerializationErrorDomain = @"com.alamofire.error.serialization.response"; 33NSString * const AFNetworkingOperationFailingURLResponseErrorKey = @"com.alamofire.serialization.response.error.response"; 118 NSMutableDictionary *mutableUserInfo = [@{ 119 NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: unacceptable content-type: %@", @"AFNetworking", nil), [response MIMEType]], 120 NSURLErrorFailingURLErrorKey:[response URL], 134 NSMutableDictionary *mutableUserInfo = [@{ 135 NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: %@ (%ld)", @"AFNetworking", nil), [NSHTTPURLResponse localizedStringForStatusCode:response.statusCode], (long)response.statusCode], 136 NSURLErrorFailingURLErrorKey:[response URL], 187 [coder encodeObject:self.acceptableStatusCodes forKey:NSStringFromSelector(@selector(acceptableStatusCodes))]; 188 [coder encodeObject:self.acceptableContentTypes forKey:NSStringFromSelector(@selector(acceptableContentTypes))]; 189} 253 @autoreleasepool { 254 NSString *responseString = [[NSString alloc] initWithData:data encoding:stringEncoding]; 255 if (responseString && ![responseString isEqualToString:@" "]) {AFURLConnectionOperation.m https://gitlab.com/trungminhnt/sampleShinobi | Objective C | 792 lines
59 60static NSString * const kAFNetworkingLockName = @"com.alamofire.networking.operation.lock"; 61 61 62NSString * const AFNetworkingOperationDidStartNotification = @"com.alamofire.networking.operation.start"; 63NSString * const AFNetworkingOperationDidFinishNotification = @"com.alamofire.networking.operation.finish"; 70 71static inline NSString * AFKeyPathFromOperationState(AFOperationState state) { 72 switch (state) { 138@property (readwrite, nonatomic, strong) NSData *responseData; 139@property (readwrite, nonatomic, copy) NSString *responseString; 140@property (readwrite, nonatomic, assign) NSStringEncoding responseStringEncoding; 229 230- (NSString *)responseString { 231 [self.lock lock];vf_coreimage.m https://gitlab.com/sjchen1981/FFmpeg | Objective C | 688 lines
105 106 NSString *filter_name; 107 while (filter_name = [filters nextObject]) { 108 av_log(ctx, AV_LOG_INFO, "Filter: %s\n", [filter_name UTF8String]); 109 NSString *input; 110 111 CIFilter *filter = [CIFilter filterWithName:filter_name]; 112 NSDictionary *filter_attribs = [filter attributes]; // <nsstring, id> 113 NSArray *filter_inputs = [filter inputKeys]; // <nsstring> 294 @try { 295 NSString *tmp_string = [NSString stringWithUTF8String:ctx->output_rect]; 296 NSRect tmp = NSRectFromString(tmp_string); 359{ 360 NSString *input_key = [NSString stringWithUTF8String:key]; 361 NSString *input_val = [NSString stringWithUTF8String:value];ViewController.m https://gitlab.com/eduardo.alencar/digitorj | Objective C | 397 lines
69 Label = (__bridge NSString *)(ABMultiValueCopyLabelAtIndex(multiPhones, j)); 70 NSString *pNumber = (__bridge NSString *) phoneNumberRef; 71 pNumber = [[[[[pNumber stringByReplacingOccurrencesOfString:@"-" withString:@""] stringByReplacingOccurrencesOfString:@" " withString:@""]stringByReplacingOccurrencesOfString:@"+" withString:@""] stringByReplacingOccurrencesOfString:@"(" withString:@""] stringByReplacingOccurrencesOfString:@")" withString:@""]; 75 if (bnovo){ 76 Label = [NSString stringWithFormat:@"%@ - %@",[[Label stringByReplacingOccurrencesOfString:@"_$!<" withString:@""]stringByReplacingOccurrencesOfString:@">!$_" withString:@""], [lsufixo text]]; 77 } 84 CFStringRef phoneNumberRef = ABMultiValueCopyValueAtIndex(multi, j); 85 NSString *pNumber = (__bridge NSString *) phoneNumberRef; 86 pNumber = [[[[[pNumber stringByReplacingOccurrencesOfString:@"-" withString:@""] stringByReplacingOccurrencesOfString:@" " withString:@""]stringByReplacingOccurrencesOfString:@"+" withString:@""] stringByReplacingOccurrencesOfString:@"(" withString:@""] stringByReplacingOccurrencesOfString:@")" withString:@""]; 172{ 173 //NSString* name = (__bridge_transfer NSString*)ABRecordCopyValue(person, kABPersonFirstNameProperty); 174 NSString* phone = nil; 185 186-(NSString *)startFormat:(NSString *)Number { 187 if (Number != Nil){JSQMessagesViewController.m https://gitlab.com/joaopaulogalvao/browteco | Objective C | 1061 lines
38 39#import "NSString+JSQMessages.h" 40#import "UIColor+JSQMessages.h" 69 70- (NSString *)jsq_currentlyComposedMessageText; 71 107{ 108 return [UINib nibWithNibName:NSStringFromClass([JSQMessagesViewController class]) 109 bundle:[NSBundle bundleForClass:[JSQMessagesViewController class]]]; 113{ 114 return [[[self class] alloc] initWithNibName:NSStringFromClass([JSQMessagesViewController class]) 115 bundle:[NSBundle bundleForClass:[JSQMessagesViewController class]]]; 315- (void)didPressSendButton:(UIButton *)button 316 withMessageText:(NSString *)text 317 senderId:(NSString *)senderIdPushPlugin.m https://gitlab.com/boxnia/NFU_MOVIL | Objective C | 611 lines
54 __weak __block PushPlugin *weakSelf = self; 55 gcmRegistrationHandler = ^(NSString *registrationToken, NSError *error){ 56 if (registrationToken != nil) { 61 if (topics != nil) { 62 for (NSString *topic in topics) { 63 NSLog(@"subscribe from topic: %@", topic); 65 [pubSub subscribeWithToken: [weakSelf gcmRegistrationToken] 66 topic:[NSString stringWithFormat:@"/topics/%@", topic] 67 options:nil 103 104- (void)willSendDataMessageWithID:(NSString *)messageID error:(NSError *)error { 105 NSLog(@"willSendDataMessageWithID"); 112 113- (void)didSendDataMessageWithID:(NSString *)messageID { 114 NSLog(@"willSendDataMessageWithID");CDVStatusBar.m https://gitlab.com/boxnia/NFU_MOVIL | Objective C | 480 lines
79 80- (id)settingForKey:(NSString*)key 81{ 84 85- (void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSDictionary*)change context:(void*)context 86{ 120 121 NSString* setting; 122 170 [self updateIsVisible:![UIApplication sharedApplication].statusBarHidden]; 171 NSString* setting = @"StatusBarOverlaysWebView"; 172 if ([self settingForKey:setting]) { 275 276- (void) setStatusBarStyle:(NSString*)statusBarStyle 277{ImageNameTest.m https://gitlab.com/boxnia/NFU_MOVIL | Objective C | 702 lines
36// expose private interface 37- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id<CDVScreenOrientationDelegate>)orientationDelegate device:(CDV_iOSDevice)device; 38 56 57 NSString* name = nil; 58 NSString* expectedImageName = nil; 59 UIInterfaceOrientation currentOrientation; 60 NSString* deviceName = device.iPad? @"iPad" : device.iPhone6Plus? @"iPhone6Plus": device.iPhone6? @"iPhone6": device.iPhone5? @"iPhone5" : @"iPhone"; 61CDVSplashScreen.m https://gitlab.com/boxnia/NFU_MOVIL | Objective C | 461 lines
56 57- (void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSDictionary*)change context:(void*)context 58{ 81 82 NSString* topActivityIndicator = [self.commandDelegate.settings objectForKey:[@"TopActivityIndicator" lowercaseString]]; 83 UIActivityIndicatorViewStyle topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray; 169 170- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id<CDVScreenOrientationDelegate>)orientationDelegate device:(CDV_iOSDevice)device 171{ 172 // Use UILaunchImageFile if specified in plist. Otherwise, use Default. 173 NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"]; 174 303{ 304 NSString* imageName = [self getImageName:[self getCurrentOrientation] delegate:(id<CDVScreenOrientationDelegate>)self.viewController device:[self getCurrentDevice]]; 305CDVFileTransfer.m https://gitlab.com/boxnia/NFU_MOVIL | Objective C | 845 lines
86 87- (NSString*)escapePathComponentForUrlString:(NSString*)urlString 88{ 106 107 NSString* userAgent = [self.commandDelegate userAgent]; 108 if (userAgent) { 188 if (multipartFormUpload) { 189 NSString* contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", kFormBoundary]; 190 [req setValue:contentType forHTTPHeaderField:@"Content-Type"]; 193 194 NSData* formBoundaryData = [[NSString stringWithFormat:@"--%@\r\n", kFormBoundary] dataUsingEncoding:NSUTF8StringEncoding]; 195 NSMutableData* postBodyBeforeFile = [NSMutableData data]; 300{ 301 NSString* source = (NSString*)[command argumentAtIndex:0]; 302 NSString* server = [command argumentAtIndex:1];CDVLocalFilesystem.m https://gitlab.com/boxnia/NFU_MOVIL | Objective C | 733 lines
26 27- (id) initWithName:(NSString *)name root:(NSString *)fsRoot 28{ 89 90- (NSString *)stripQueryParametersFromPath:(NSString *)fullPath 91{ 98 99- (NSString *)filesystemPathForFullPath:(NSString *)fullPath 100{ 125 if (fullPath) { 126 NSString* escapedPath = [fullPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; 127 if ([fullPath hasPrefix:@"/"]) { 140 141- (NSString *)normalizePath:(NSString *)rawPath 142{CDVFile.m https://gitlab.com/boxnia/NFU_MOVIL | Objective C | 1117 lines
25 26static NSString* toBase64(NSData* data) { 27 SEL s1 = NSSelectorFromString(@"cdv_base64EncodedString"); 31 if ([data respondsToSelector:s1]) { 32 NSString* (*func)(id, SEL) = (void *)[data methodForSelector:s1]; 33 return func(data, s1); 34 } else if ([data respondsToSelector:s2]) { 35 NSString* (*func)(id, SEL) = (void *)[data methodForSelector:s2]; 36 return func(data, s2); 37 } else if ([data respondsToSelector:s3]) { 38 NSString* (*func)(id, SEL, NSUInteger) = (void *)[data methodForSelector:s3]; 39 return func(data, s3, 0); 46 47extern NSString * const NSURLIsExcludedFromBackupKey __attribute__((weak_import)); 48CameraTest.m https://gitlab.com/boxnia/NFU_MOVIL | Objective C | 511 lines
155 XCTAssertEqual(picker.allowsEditing, pictureOptions.allowsEditing); 156 XCTAssertEqualObjects(picker.mediaTypes, @[(NSString*)kUTTypeImage]); 157 XCTAssertEqual(picker.cameraDevice, pictureOptions.cameraDirection); 216 XCTAssertEqual(picker.allowsEditing, pictureOptions.allowsEditing); 217 XCTAssertEqualObjects(picker.mediaTypes, @[(NSString*)kUTTypeMovie]); 218 }CDVCamera.m https://gitlab.com/boxnia/NFU_MOVIL | Objective C | 765 lines
40 41static NSString* toBase64(NSData* data) { 42 SEL s1 = NSSelectorFromString(@"cdv_base64EncodedString"); 46 if ([data respondsToSelector:s1]) { 47 NSString* (*func)(id, SEL) = (void *)[data methodForSelector:s1]; 48 return func(data, s1); 49 } else if ([data respondsToSelector:s2]) { 50 NSString* (*func)(id, SEL) = (void *)[data methodForSelector:s2]; 51 return func(data, s2); 52 } else if ([data respondsToSelector:s3]) { 53 NSString* (*func)(id, SEL, NSUInteger) = (void *)[data methodForSelector:s3]; 54 return func(data, s3, 0); 167#pragma clang diagnostic ignored "-Wtautological-pointer-compare" 168 NSString* settingsButton = (&UIApplicationOpenSettingsURLString != NULL) 169 ? NSLocalizedString(@"Settings", nil)NSObject+KiwiStubAdditions.m https://bitbucket.org/kumaranvram/ios-bootcamp.git | Objective C | 245 lines
14 15static NSString * const StubValueKey = @"StubValueKey"; 16static NSString * const StubSecondValueKey = @"StubSecondValueKey"; 16static NSString * const StubSecondValueKey = @"StubSecondValueKey"; 17static NSString * const ChangeStubValueAfterTimesKey = @"ChangeStubValueAfterTimesKey"; 18 28 29 NSString *encoding = KWEncodingForVoidMethod(); 30 return [NSMethodSignature signatureWithObjCTypes:[encoding UTF8String]]; 125 [NSException raise:@"KWStubException" format:@"cannot stub -%@ because no such method exists", 126 NSStringFromSelector(aMessagePattern.selector)]; 127 } 137 [NSException raise:@"KWStubException" format:@"cannot stub -%@ because no such method exists", 138 NSStringFromSelector(aMessagePattern.selector)]; 139 }hadoopfs.m https://gitlab.com/essere.lab.public/qualitas.class-corpus | Objective C | 2160 lines
120 121- (NSString *) pathname { 122 return [[__pathname retain] autorelease]; 124 125- (void) setPathname: (NSString *) pathname { 126 [pathname retain]; 197@implementation FileStatus 198- (id) initWithPath: (NSString *) path length: (int64_t) length isdir: (BOOL) isdir block_replication: (int16_t) block_replication blocksize: (int64_t) blocksize modification_time: (int64_t) modification_time permission: (NSString *) permission owner: (NSString *) owner group: (NSString *) group 199{ 234 235- (void) setPath: (NSString *) path { 236 [path retain]; 340 341- (void) setPermission: (NSString *) permission { 342 [permission retain];ANTLRCommonTreeTest.m https://gitlab.com/essere.lab.public/qualitas.class-corpus | Objective C | 555 lines
47 if (tree != nil && tree.token != nil) { 48 STAssertEquals((NSUInteger) tree.token.line, (NSUInteger)1, [NSString stringWithFormat:@"Tree should be at line 1, but was at %d", tree.token.line] ); 49 STAssertEquals((NSUInteger) tree.token.charPositionInLine, (NSUInteger)4, [NSString stringWithFormat:@"Char position should be 1, but was at %d", tree.token.charPositionInLine]); 107{ 108 NSString *aString; 109 ANTLRCommonTree *errorTree = [ANTLRCommonTree invalidNode];SymbolTableLexer.m https://gitlab.com/essere.lab.public/qualitas.class-corpus | Objective C | 712 lines
138 139- (NSString *) description 140{ 160 161+ (NSString *) tokenNameForType:(NSInteger)aTokenType 162{SimpleCParser.m https://gitlab.com/essere.lab.public/qualitas.class-corpus | Objective C | 1438 lines
101 102- (NSString *) description 103{SimpleCLexer.m https://gitlab.com/essere.lab.public/qualitas.class-corpus | Objective C | 1160 lines
36 37+ (NSString *) tokenNameForType:(NSInteger)aTokenType 38{ANTLRTreeWizard.m https://gitlab.com/essere.lab.public/qualitas.class-corpus | Objective C | 735 lines
129 130- (NSString *)toString 131{ 132 if ( label != nil ) { 133 return [NSString stringWithFormat:@"\% %@ : %@", label, [super toString]]; 134 } 292 for (int ttype = ANTLRTokenTypeMIN; ttype < [theTokNams count]; ttype++) { 293 NSString *name = (NSString *) [theTokNams objectAtIndex:ttype]; 294 [m putName:name TType:ttype]; 299/** Using the map of token names to token types, return the type. */ 300- (NSInteger)getTokenType:(NSString *)tokenName 301{ 364/** Return a List of subtrees matching pattern. */ 365- (AMutableArray *)find:(ANTLRCommonTree *)t Pattern:(NSString *)pattern 366{ANTLRTokenRewriteStream.m https://gitlab.com/essere.lab.public/qualitas.class-corpus | Objective C | 692 lines
288 289- (void) insertAfterProgNam:(NSString *)programName Index:(NSInteger)anIndex Text:(NSString *)theText 290{ 342 343- (void) replaceProgNam:(NSString *)programName Token:(id<ANTLRToken>)from Token:(id<ANTLRToken>)to Text:(NSString *)theText 344{ 347 348- (void) replaceProgNam:(NSString *)programName FromIndex:(NSInteger)from ToIndex:(NSInteger)to Text:(NSString *)theText 349{ 447 448- (NSString *)toString:(NSString *)programName 449{ 458 459- (NSString *)toString:(NSString *)programName FromStart:(NSInteger)start ToEnd:(NSInteger)end 460{ANTLRBaseRecognizer.m https://gitlab.com/essere.lab.public/qualitas.class-corpus | Objective C | 1129 lines
42static AMutableArray *_tokenNames; 43static NSString *_grammarFileName; 44static NSString *NEXT_TOKEN_RULE_NAME; 54{ 55 NEXT_TOKEN_RULE_NAME = [NSString stringWithString:@"nextToken"]; 56 [NEXT_TOKEN_RULE_NAME retain]; 87 88+ (void)setGrammarFileName:(NSString *)aFileName 89{ 321{ 322 NSString *hdr = [self getErrorHeader:e]; 323 NSString *msg = [self getErrorMessage:e TokenNames:theTokNams]; 323 NSString *msg = [self getErrorMessage:e TokenNames:theTokNams]; 324 [self emitErrorMessage:[NSString stringWithFormat:@" %@ %@", hdr, msg]]; 325}ACBTree.m https://gitlab.com/essere.lab.public/qualitas.class-corpus | Objective C | 721 lines
27 28+ (ACBKey *)newKeyWithKStr:(NSString *)aKey 29{ 29{ 30 return [[ACBKey alloc] initWithKStr:(NSString *)aKey]; 31} 41 42- (id) initWithKStr:(NSString *)aKey 43{ 118 119- (ACBTree *)deletekey:(NSString *)dkey 120{ 124 125 if ( [dkey isKindOfClass:[NSString class]] ) { 126 dkp = [ACBKey newKeyWithKStr:dkey];UVWelcomeViewController.m https://gitlab.com/lisit1003/uservoice-ios-sdk | Objective C | 373 lines
61- (void)customizeCellForForum:(UITableViewCell *)cell indexPath:(NSIndexPath *)indexPath { 62 NSString *detail; 63 if ([UVSession currentSession].forum.suggestionsCount == 1) { 65 } else { 66 detail = [NSString stringWithFormat:NSLocalizedStringFromTableInBundle(@"%@ ideas", @"UserVoice", [UserVoice bundle], nil), [UVUtils formatInteger:[UVSession currentSession].forum.suggestionsCount]]; 67 } 78 cell.textLabel.text = topic.name; 79 cell.detailTextLabel.text = [NSString stringWithFormat:@"%d", (int)topic.articleCount]; 80 } 120- (UITableViewCell *)tableView:(UITableView *)theTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 121 NSString *identifier = @""; 122 NSInteger style = UITableViewCellStyleValue1; 148 if (tableView == _searchController.searchResultsTableView || _searching) { 149 NSString *identifier; 150 id model = [self.searchResults objectAtIndex:indexPath.row];UVSuggestionDetailsViewController.m https://gitlab.com/lisit1003/uservoice-ios-sdk | Objective C | 590 lines
114 if ([UVSession currentSession].clientConfig.displaySuggestionsByRank) { 115 _subscriberCount.text = [NSString stringWithFormat:NSLocalizedStringFromTableInBundle(@"Ranked %@", @"UserVoice", [UserVoice bundle], nil), _suggestion.rankString]; 116 } else { 119 } else { 120 _subscriberCount.text = [NSString stringWithFormat:NSLocalizedStringFromTableInBundle(@"%d people", @"UserVoice", [UserVoice bundle], nil), _suggestion.subscriberCount]; 121 } 135- (UITableViewCell *)tableView:(UITableView *)theTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 136 NSString *identifier; 137 UITableViewCellStyle style = UITableViewCellStyleDefault; 233 category.font = [UIFont systemFontOfSize:13]; 234 category.text = _suggestion.category.name ? [NSString stringWithFormat:@"%@ / %@", NSLocalizedStringFromTableInBundle(@"Feedback", @"UserVoice", [UserVoice bundle], nil), _suggestion.category.name] : NSLocalizedStringFromTableInBundle(@"Feedback", @"UserVoice", [UserVoice bundle], nil); 235 category.adjustsFontSizeToFitWidth = YES;UVBaseViewController.m https://gitlab.com/lisit1003/uservoice-ios-sdk | Objective C | 544 lines
118 119- (void)alertError:(NSString *)message { 120 [[[UIAlertView alloc] initWithTitle:NSLocalizedStringFromTableInBundle(@"Error", @"UserVoice", [UserVoice bundle], nil) 127- (void)didReceiveError:(NSError *)error { 128 NSString *msg = nil; 129 [self hideActivityIndicator]; 133 NSDictionary *userInfo = [error userInfo]; 134 for (NSString *key in [userInfo allKeys]) { 135 if ([key isEqualToString:@"message"] || [key isEqualToString:@"type"]) 136 continue; 137 NSString *displayKey = nil; 138 if ([key isEqualToString:@"display_name"]) 146 else 147 msg = [NSString stringWithFormat:@"%@ %@", displayKey, [userInfo valueForKey:key]]; 148 }UI7TableView.m https://gitlab.com/lisit1003/UI7Kit | Objective C | 471 lines
52 53 if (![NSStringFromClass([self class]) hasPrefix:@"AB"]) { 54 self.backgroundView = nil; 62 63- (id)__dequeueReusableCellWithIdentifier:(NSString *)identifier forIndexPath:(NSIndexPath *)indexPath { 64 return [self dequeueReusableCellWithIdentifier:identifier]; 71// 72//- (NSInteger)__decodeIntegerForKey:(NSString *)key { assert(NO); } 73// 73// 74//- (NSInteger)_UI7TableView_decodeIntegerForKey:(NSString *)key { 75// if ([key isEqualToString:@"UIStyle"]) { 149 if (color == UI7TableViewGroupedViewPatternColor) { 150 if (![NSStringFromClass([self class]) hasPrefix:@"AB"]) { 151 self.backgroundColor = [UI7Color groupedTableViewSectionBackgroundColor];SDImageCache.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 534 lines
118 119- (NSString *)cachePathForKey:(NSString *)key inPath:(NSString *)path { 120 NSString *filename = [self cachedFileNameForKey:key]; 123 124- (NSString *)defaultCachePathForKey:(NSString *)key { 125 return [self cachePathForKey:key inPath:self.diskCachePath]; 129 130- (NSString *)cachedFileNameForKey:(NSString *)key { 131 const char *str = [key UTF8String]; 136 CC_MD5(str, (CC_LONG)strlen(str), r); 137 NSString *filename = [NSString stringWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", 138 r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8], r[9], r[10], r[11], r[12], r[13], r[14], r[15]]; 201 202- (BOOL)diskImageExistsWithKey:(NSString *)key { 203 BOOL exists = NO;PSTCollectionViewLayout.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 481 lines
37@property (nonatomic) PSTCollectionViewItemType elementCategory; 38@property (nonatomic, copy) NSString *elementKind; 39@end 57 58+ (instancetype)layoutAttributesForSupplementaryViewOfKind:(NSString *)elementKind withIndexPath:(NSIndexPath *)indexPath { 59 PSTCollectionViewLayoutAttributes *attributes = [self new]; 99- (NSString *)description { 100 return [NSString stringWithFormat:@"<%@: %p frame:%@ indexPath:%@ elementKind:%@>", NSStringFromClass(self.class), self, NSStringFromCGRect(self.frame), self.indexPath, self.elementKind]; 101} 172 if (!signature) { 173 NSString *selString = NSStringFromSelector(selector); 174 if ([selString hasPrefix:@"_"]) { 182- (void)forwardInvocation:(NSInvocation *)invocation { 183 NSString *selString = NSStringFromSelector([invocation selector]); 184 if ([selString hasPrefix:@"_"]) {PSTCollectionViewFlowLayout.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 420 lines
15 16NSString *const PSTCollectionElementKindSectionHeader = @"UICollectionElementKindSectionHeader"; 17NSString *const PSTCollectionElementKindSectionFooter = @"UICollectionElementKindSectionFooter"; 19// this is not exposed in UICollectionViewFlowLayout 20NSString *const PSTFlowLayoutCommonRowHorizontalAlignmentKey = @"UIFlowLayoutCommonRowHorizontalAlignmentKey"; 21NSString *const PSTFlowLayoutLastRowHorizontalAlignmentKey = @"UIFlowLayoutLastRowHorizontalAlignmentKey"; 21NSString *const PSTFlowLayoutLastRowHorizontalAlignmentKey = @"UIFlowLayoutLastRowHorizontalAlignmentKey"; 22NSString *const PSTFlowLayoutRowVerticalAlignmentKey = @"UIFlowLayoutRowVerticalAlignmentKey"; 23 233 234- (PSTCollectionViewLayoutAttributes *)layoutAttributesForSupplementaryViewOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath { 235 if (!_data) [self prepareLayout]; 261 262- (PSTCollectionViewLayoutAttributes *)layoutAttributesForDecorationViewWithReuseIdentifier:(NSString *)identifier atIndexPath:(NSIndexPath *)indexPath { 263 return nil;PSTCollectionView.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 1121 lines
38} 39@property (nonatomic, copy) NSString *elementKind; 40@end 59 int _firstResponderViewType; 60 NSString *_firstResponderViewKind; 61 NSIndexPath *_firstResponderIndexPath; 194 195 for (NSString *identifier in cellNibs.allKeys) { 196 _cellNibDict[identifier] = cellNibs[identifier]; 203 204 for (NSString *identifier in supplementaryViewNibs.allKeys) { 205 _supplementaryViewNibDict[identifier] = supplementaryViewNibs[identifier]; 222 223- (NSString *)description { 224 return [NSString stringWithFormat:@"%@ collection view layout: %@", [super description], self.collectionViewLayout];HPGrowingTextView.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 666 lines
163 // Use internalTextView for height calculations, thanks to Gwynne <http://blog.darkrainfall.org/> 164 NSString *saveText = internalTextView.text, *newText = @"-"; 165 200 // Use internalTextView for height calculations, thanks to Gwynne <http://blog.darkrainfall.org/> 201 NSString *saveText = internalTextView.text, *newText = @"-"; 202 232 233- (NSString *)placeholder 234{ 237 238- (void)setPlaceholder:(NSString *)placeholder 239{ 425 426-(void)setText:(NSString *)newText 427{FMDatabase.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 1413 lines
6 7- (FMResultSet *)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray*)arrayArgs orDictionary:(NSDictionary *)dictionaryArgs orVAList:(va_list)args; 8- (BOOL)executeUpdate:(NSString*)sql error:(NSError**)outErr withArgumentsInArray:(NSArray*)arrayArgs orDictionary:(NSDictionary *)dictionaryArgs orVAList:(va_list)args; 20 21+ (instancetype)databaseWithPath:(NSString*)aPath { 22 return FMDBReturnAutoreleased([[self alloc] initWithPath:aPath]); 28 29- (instancetype)initWithPath:(NSString*)aPath { 30 64 65- (NSString *)databasePath { 66 return _databasePath; 68 69+ (NSString*)FMDBUserVersion { 70 return @"2.3";AFURLResponseSerialization.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 779 lines
116 NSDictionary *userInfo = @{ 117 NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: unacceptable content-type: %@", @"AFNetworking", nil), [response MIMEType]], 118 NSURLErrorFailingURLErrorKey:[response URL], 129 NSDictionary *userInfo = @{ 130 NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: %@ (%ld)", @"AFNetworking", nil), [NSHTTPURLResponse localizedStringForStatusCode:response.statusCode], (long)response.statusCode], 131 NSURLErrorFailingURLErrorKey:[response URL], 178 [coder encodeObject:self.acceptableStatusCodes forKey:NSStringFromSelector(@selector(acceptableStatusCodes))]; 179 [coder encodeObject:self.acceptableContentTypes forKey:NSStringFromSelector(@selector(acceptableContentTypes))]; 180} 233 // See https://github.com/rails/rails/issues/1742 234 NSStringEncoding stringEncoding = self.stringEncoding; 235 if (response.textEncodingName) { 244 @autoreleasepool { 245 NSString *responseString = [[NSString alloc] initWithData:data encoding:stringEncoding]; 246 if (responseString && ![responseString isEqualToString:@" "]) {AFURLRequestSerialization.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 1281 lines
35 36static NSString * AFBase64EncodedStringFromString(NSString *string) { 37 NSData *data = [NSData dataWithBytes:[string UTF8String] length:[string lengthOfBytesUsingEncoding:NSUTF8StringEncoding]]; 66 67static NSString * AFPercentEscapedQueryStringKeyFromStringWithEncoding(NSString *string, NSStringEncoding encoding) { 68 static NSString * const kAFCharactersToLeaveUnescapedInQueryStringPairKey = @"[]."; 72 73static NSString * AFPercentEscapedQueryStringValueFromStringWithEncoding(NSString *string, NSStringEncoding encoding) { 74 return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, NULL, (__bridge CFStringRef)kAFCharactersToBeEscapedInQueryString, CFStringConvertNSStringEncodingToEncoding(encoding)); 213 // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43 214 userAgent = [NSString stringWithFormat:@"%@/%@ (%@; iOS %@; Scale/%0.2f)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey], (__bridge id)CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleVersionKey) ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]]; 215#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) 215#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) 216 userAgent = [NSString stringWithFormat:@"%@/%@ (Mac OS X %@)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey], [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleVersionKey], [[NSProcessInfo processInfo] operatingSystemVersionString]]; 217#endifEditGroupViewController.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 504 lines
40 41- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 42{ 113} 114-(BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString { 115 if ([searchString isEqualToString:@""]) { 255 if (tableView.tag == 100) { 256 NSString *keyStr = [self allKeys][(NSUInteger) (section)]; 257 NSArray *arr = (self.items)[keyStr]; 263 264- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { 265 271 [[self allKeys] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 272 char firstLetter = getFirstChar((NSString *)obj); 273 [arr addObject:[NSString stringWithFormat:@"%c",firstLetter]];ChattingMainViewController.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 1268 lines
77@property(assign)PanelStatus panelStatus; 78@property(strong)NSString *chatObjectID; 79@property(strong) UIButton *titleBtn ; 110 TouchDownGestureRecognizer* _touchDownGestureRecognizer; 111 NSString* _currentInputContent; 112 UIButton *_recordButton; 139 NSDictionary* messageContentDic = @{DD_IMAGE_LOCAL_KEY:photo.localPath}; 140 NSString* messageContent = [messageContentDic jsonString]; 141 149 150 } failure:^(NSString *errorDescripe) { 151 DDLog(@"消息插入DB失败"); 153 photo=nil; 154 [[DDSendPhotoMessageAPI sharedPhotoCache] uploadImage:messageContentDic[DD_IMAGE_LOCAL_KEY] success:^(NSString *imageURL) { 155 [self scrollToBottomAnimated:YES];ContactsViewController.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 443 lines
230 { 231 NSString *keyStr = [self allKeys][(NSUInteger) (section - 2)]; 232 NSArray *arr = (self.items)[keyStr]; 236 237 NSString *keyStr = [self allKeys][(NSUInteger) (section)]; 238 NSArray *arr = (self.items)[keyStr]; 260{ 261 static NSString *cellIdentifier = @"contactsCell"; 262 DDContactsCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier ]; 353 } 354 NSString *string = [NSString stringWithFormat:@"tel:%@",user.telphone]; 355 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:string]]; 361 } 362 NSString *string = [NSString stringWithFormat:@"mailto:%@",user.email]; 363 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:string]];AQGridViewCell.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 706 lines
48@property (nonatomic, retain) UIView * contentView; 49@property (nonatomic, copy) NSString * reuseIdentifier; 50- (void) flipHighlightTimerFired: (NSTimer *) timer; 58 59- (id) initWithFrame: (CGRect) frame reuseIdentifier: (NSString *) reuseIdentifier 60{ 292 { 293 NSString *imageName = nil; 294#ifdef BUILTIN_IMAGES 411 412- (void) highlightAnimationStopped: (NSString * __unused) animationID context: (void * __unused) context 413{AQGridView.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 1603 lines
71 72NSString * const AQGridViewSelectionDidChangeNotification = @"AQGridViewSelectionDidChangeNotification"; 73 455 456 //NSLog( @"Resetting offset from %@ to %@", NSStringFromCGPoint(oldOffset), NSStringFromCGPoint(offset) ); 457 self.contentOffset = offset;DDMessageModule.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 453 lines
149 } 150 } failure:^(NSString *errorDescripe) { 151 NSLog(@"消息插入DB失败"); 194} 195- (NSArray*)popAllUnreadMessagesForSessionID:(NSString*)sessionID 196{ 213 } 214 } failure:^(NSString *errorDescripe) { 215 NSLog(@"消息插入DB失败"); 276 [usersArray enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 277 NSString* userID = (NSString*)obj; 278 DDGetUserUnreadMessagesAPI* getUserUnreadMessageAPI = [[DDGetUserUnreadMessagesAPI alloc] init]; 333 [usersArray enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 334 NSString* groupID = (NSString*)obj; 335 DDGroupsUnreadMessageAPI* getUserUnreadMessageAPI = [[DDGroupsUnreadMessageAPI alloc] init];DDDatabaseUtil.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 763 lines
104{ 105 NSString* directorPath = [NSString userExclusiveDirection]; 106 268 [_database setShouldCacheStatements:YES]; 269 NSString* sqlString = [NSString stringWithFormat:@"select * from %@ where sessionId = ? AND messageID >= ? order by msgTime DESC,rowid DESC",TABLE_MESSAGE]; 270 FMResultSet* result = [_database executeQuery:sqlString,sessionID,message.msgID]; 288 [_database setShouldCacheStatements:YES]; 289 NSString* sqlString = [NSString stringWithFormat:@"SELECT * from %@ where sessionId=? AND messageType = ? ORDER BY msgTime DESC,rowid DESC limit 0,1",TABLE_MESSAGE]; 290 FMResultSet* result = [_database executeQuery:sqlString,sessionID,@(4)]; 309 310 NSString* sqlString = [NSString stringWithFormat:@"SELECT * FROM %@ where sessionId=? ORDER BY msgTime DESC,rowid DESC limit 0,1",TABLE_MESSAGE]; 311 334 335 NSString* sqlString = [NSString stringWithFormat:@"SELECT COUNT(*) FROM %@ where sessionId=?",TABLE_MESSAGE]; 336std.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 257 lines
10 11NSString *bundleVerison(){ 12 NSBundle * bundle=[NSBundle mainBundle]; 12 NSBundle * bundle=[NSBundle mainBundle]; 13 NSString * ver=[bundle.infoDictionary objectForKey:@"CFBundleShortVersionString"]; 14 return ver;IMClient2ServGroup.pb.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 1617 lines
109} 110- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { 111 if (self.hasCmdId) { 338} 339- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { 340 if (self.hasCmdId) { 345 [element writeDescriptionTo:output 346 withIndent:[NSString stringWithFormat:@"%@ ", indent]]; 347 [output appendFormat:@"%@}\n", indent];IMClient2ServFile.pb.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 1725 lines
109} 110- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { 111 if (self.hasCmdId) { 314} 315- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { 316 if (self.hasCmdId) { 435@property SInt32 cmdId; 436@property (strong) NSString* userId; 437@property (strong) NSString* token;IMBaseDefine.pb.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 1811 lines
91@interface IpAddr () 92@property (strong) NSString* ip; 93@property UInt32 port; 198} 199- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { 200 if (self.hasIp) { 317} 318- (NSString*) ip { 319 return result.ip; 320} 321- (IpAddrBuilder*) setIp:(NSString*) value { 322 result.hasIp = YES; 349@interface ClientUserInfo () 350@property (strong) NSString* userId; 351@property (strong) NSString* name;AFURLRequestSerialization.m https://gitlab.com/lisit1003/test | Objective C | 1272 lines
65 66static NSString * AFPercentEscapedQueryStringKeyFromStringWithEncoding(NSString *string, NSStringEncoding encoding) { 67 static NSString * const kAFCharactersToLeaveUnescapedInQueryStringPairKey = @"[]."; 71 72static NSString * AFPercentEscapedQueryStringValueFromStringWithEncoding(NSString *string, NSStringEncoding encoding) { 73 return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, NULL, (__bridge CFStringRef)kAFCharactersToBeEscapedInQueryString, CFStringConvertNSStringEncodingToEncoding(encoding)); 212 // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43 213 userAgent = [NSString stringWithFormat:@"%@/%@ (%@; iOS %@; Scale/%0.2f)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey], (__bridge id)CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleVersionKey) ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]]; 214#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) 214#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) 215 userAgent = [NSString stringWithFormat:@"%@/%@ (Mac OS X %@)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey], [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleVersionKey], [[NSProcessInfo processInfo] operatingSystemVersionString]]; 216#endif 243 244- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username password:(NSString *)password { 245 NSString *basicAuthCredentials = [NSString stringWithFormat:@"%@:%@", username, password];AFURLConnectionOperation.m https://gitlab.com/lisit1003/test | Objective C | 793 lines
66 67static NSString * const kAFNetworkingLockName = @"com.alamofire.networking.operation.lock"; 68 68 69NSString * const AFNetworkingErrorDomain = @"AFNetworkingErrorDomain"; 70NSString * const AFNetworkingOperationFailingURLRequestErrorKey = @"AFNetworkingOperationFailingURLRequestErrorKey"; 70NSString * const AFNetworkingOperationFailingURLRequestErrorKey = @"AFNetworkingOperationFailingURLRequestErrorKey"; 71NSString * const AFNetworkingOperationFailingURLResponseErrorKey = @"AFNetworkingOperationFailingURLResponseErrorKey"; 72 72 73NSString * const AFNetworkingOperationDidStartNotification = @"com.alamofire.networking.operation.start"; 74NSString * const AFNetworkingOperationDidFinishNotification = @"com.alamofire.networking.operation.finish"; 80 81static inline NSString * AFKeyPathFromOperationState(AFOperationState state) { 82 switch (state) {NSArray+PureLayout.m https://gitlab.com/lisit1003/TableViewCellWithAutoLayoutiOS8 | Objective C | 455 lines
76 */ 77- (instancetype)autoIdentifyConstraints:(NSString *)identifer 78{ALView+PureLayout.m https://gitlab.com/lisit1003/TableViewCellWithAutoLayoutiOS8 | Objective C | 1061 lines
197 */ 198+ (NSString *)al_currentGlobalConstraintIdentifier 199{ 215 */ 216+ (void)autoSetIdentifier:(NSString *)identifer forConstraints:(ALConstraintsBlock)block 217{SPHViewController.m https://gitlab.com/lisit1003/SPHChatBubble | Objective C | 800 lines
67 [formatter setDateFormat:@"hh:mm a"]; 68 NSString *rowNumber=[NSString stringWithFormat:@"%d",sphBubbledata.count]; 69 [self adddBubbledata:@"textByme" mtext:@"Hi!!!!!!!" mtime:[formatter stringFromDate:date] mimage:Uploadedimage.image msgstatus:@"Sending"]; 218 219 NSString *rowNumber=[NSString stringWithFormat:@"%d",sphBubbledata.count]; 220 260 imgPicker.mediaTypes = [NSArray arrayWithObjects: 261 (NSString *) kUTTypeImage, 262 nil]; 313{ 314 NSString *chat_Message=textView.text; 315 textView.text=@""; 320 321 NSString *rowNumber=[NSString stringWithFormat:@"%d",sphBubbledata.count]; 322HPGrowingTextView.m https://gitlab.com/lisit1003/SPHChatBubble | Objective C | 539 lines
133 // Use internalTextView for height calculations, thanks to Gwynne <http://blog.darkrainfall.org/> 134 NSString *saveText = internalTextView.text, *newText = @"-"; 135 162 // Use internalTextView for height calculations, thanks to Gwynne <http://blog.darkrainfall.org/> 163 NSString *saveText = internalTextView.text, *newText = @"-"; 164 322 323-(void)setText:(NSString *)newText 324{ 331 332-(NSString*) text 333{ 504- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range 505 replacementText:(NSString *)atext { 506AsyncImageView.m https://gitlab.com/lisit1003/SPHChatBubble | Objective C | 709 lines
37 38NSString *const AsyncImageLoadDidFinish = @"AsyncImageLoadDidFinish"; 39NSString *const AsyncImageLoadDidFail = @"AsyncImageLoadDidFail"; 39NSString *const AsyncImageLoadDidFail = @"AsyncImageLoadDidFail"; 40NSString *const AsyncImageTargetReleased = @"AsyncImageTargetReleased"; 41 41 42NSString *const AsyncImageImageKey = @"image"; 43NSString *const AsyncImageURLKey = @"URL"; 43NSString *const AsyncImageURLKey = @"URL"; 44NSString *const AsyncImageCacheKey = @"cache"; 45NSString *const AsyncImageErrorKey = @"error"; 105 { 106 NSString *path = [[_URL absoluteURL] path]; 107 NSString *resourcePath = [[NSBundle mainBundle] resourcePath];NSArray+PureLayout.m https://gitlab.com/lisit1003/PureLayout | Objective C | 506 lines
99 */ 100- (instancetype)autoIdentifyConstraints:(NSString *)identifier 101{ALView+PureLayout.m https://gitlab.com/lisit1003/PureLayout | Objective C | 1088 lines
222 */ 223+ (NSString *)al_currentGlobalConstraintIdentifier 224{ 240 */ 241+ (void)autoSetIdentifier:(NSString *)identifier forConstraints:(ALConstraintsBlock)block 242{MasterViewController.m https://gitlab.com/lisit1003/SDWebImage | Objective C | 393 lines
21 22- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 23{CDVSplashScreen.m https://gitlab.com/blocknotary/IonicInterviews | Objective C | 506 lines
57 58- (void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSDictionary*)change context:(void*)context 59{ 82 83 NSString* topActivityIndicator = [self.commandDelegate.settings objectForKey:[@"TopActivityIndicator" lowercaseString]]; 84 UIActivityIndicatorViewStyle topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray; 181- (BOOL) isUsingCDVLaunchScreen { 182 NSString* launchStoryboardName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchStoryboardName"]; 183 if (launchStoryboardName) { 189 190- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id<CDVScreenOrientationDelegate>)orientationDelegate device:(CDV_iOSDevice)device 191{ 192 // Use UILaunchImageFile if specified in plist. Otherwise, use Default. 193 NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"]; 194CDVViewController.m https://gitlab.com/blocknotary/IonicInterviews | Objective C | 784 lines
247 if (setting) { 248 NSString* errorUrlString = (NSString*)setting; 249 if ([errorUrlString rangeOfString:@"://"].location != NSNotFound) { 251 } else { 252 NSURL* url = [NSURL URLWithString:(NSString*)setting]; 253 NSString* errorFilePath = [self.commandDelegate pathForResource:[url path]]; 279 280 NSString* backupWebStorageType = @"cloud"; // default value 281 331 } else { 332 NSString* loadErr = [NSString stringWithFormat:@"ERROR: Start Page at '%@/%@' was not found.", self.wwwFolderName, self.startPage]; 333 NSLog(@"%@", loadErr); 340 } else { 341 NSString* html = [NSString stringWithFormat:@"<html><body> %@ </body></html>", loadErr]; 342 [self.webViewEngine loadHTMLString:html baseURL:nil];CDVLocalStorage.m https://gitlab.com/blocknotary/IonicInterviews | Objective C | 487 lines
45 46+ (NSMutableArray*)createBackupInfoWithTargetDir:(NSString*)targetDir backupDir:(NSString*)backupDir targetDirNests:(BOOL)targetDirNests backupDirNests:(BOOL)backupDirNests rename:(BOOL)rename 47{ 132 133+ (BOOL)copyFrom:(NSString*)src to:(NSString*)dest error:(NSError* __autoreleasing*)error 134{ 137 if (![fileManager fileExistsAtPath:src]) { 138 NSString* errorString = [NSString stringWithFormat:@"%@ file does not exist.", src]; 139 if (error != NULL) { 150 CFStringRef uuidString = CFUUIDCreateString(kCFAllocatorDefault, uuidRef); 151 NSString* tempBackup = [[NSTemporaryDirectory() stringByAppendingPathComponent:(__bridge NSString*)uuidString] stringByAppendingPathExtension:@"bak"]; 152 CFRelease(uuidString); 282 NSString* bundleIdentifier = [[mainBundle infoDictionary] objectForKey:@"CFBundleIdentifier"]; 283 NSString* appPlistPath = [bundlePath stringByAppendingPathComponent:[NSString stringWithFormat:@"Library/Preferences/%@.plist", bundleIdentifier]]; 284CDVWhitelistTests.m https://gitlab.com/blocknotary/IonicInterviews | Objective C | 332 lines
201 NSString* errorString = [whitelist errorStringForURL:testUrl]; 202 NSString* expectedErrorString = [NSString stringWithFormat:kCDVDefaultWhitelistRejectionString, [testUrl absoluteString]]; 203 207 errorString = [whitelist errorStringForURL:testUrl]; 208 expectedErrorString = [NSString stringWithFormat:whitelist.whitelistRejectionFormatString, [testUrl absoluteString]]; 209 XCTAssertTrue([expectedErrorString isEqualToString:errorString], @"Customized whitelist rejection string has unexpected value.");TiAnimation.m https://github.com/oddlyzen/titanium_mobile.git | Objective C | 564 lines
229{ 230 return [NSString stringWithFormat:@"[object TiAnimation<%d>]",[self hash]]; 231} 232 233-(void)animationStarted:(NSString *)animationID context:(void *)context 234{ 251 252-(void)animationCompleted:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context 253{ 388 NSArray * animationKeys = [transitionLayer animationKeys]; 389 for (NSString * thisKey in animationKeys) 390 { 402 // autoreverse cleanup/view release may be applied to the animation. 403 [UIView beginAnimations:[NSString stringWithFormat:@"%X",(void *)theview] context:(void*)self]; 404 [UIView setAnimationDelegate:self];GStreamerBackend.m https://gitlab.com/JamesGiller/gst-sdk-tutorials | Objective C | 387 lines
77 78-(void) setUri:(NSString*)uri 79{ 102{ 103 NSString *string = [NSString stringWithUTF8String:message]; 104 if(ui_delegate && [ui_delegate respondsToSelector:@selector(gstreamerSetUIMessage:)])HIDRemote.m https://gitlab.com/sloshedpuppie/LetsGoRetro | Objective C | 1599 lines
100 [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(_handleNotifications:) name:kHIDRemoteDNHIDRemotePing object:nil]; 101 [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(_handleNotifications:) name:kHIDRemoteDNHIDRemoteRetry object:[NSString stringWithFormat:@"%d", getpid()]]; 102 126 [[NSDistributedNotificationCenter defaultCenter] removeObserver:self name:kHIDRemoteDNHIDRemotePing object:nil]; 127 [[NSDistributedNotificationCenter defaultCenter] removeObserver:self name:kHIDRemoteDNHIDRemoteRetry object:[NSString stringWithFormat:@"%d", getpid()]]; 128WebSocket.m https://gitlab.com/base.io/io | Objective C | 786 lines
172 173 NSString *temp = [[NSString alloc] initWithData:requestHeaders encoding:NSUTF8StringEncoding]; 174 HTTPLogVerbose(@"%@[%p] Request Headers:\n%@", THIS_FILE, self, temp); 310 { 311 NSString *port = [NSString stringWithFormat:@"%hu", [asyncSocket localPort]]; 312 497 NSString *s2 = [[NSString alloc] initWithData:d2 encoding:NSASCIIStringEncoding]; 498 NSString *s3 = [[NSString alloc] initWithData:d3 encoding:NSASCIIStringEncoding]; 499 499 500 NSString *s0 = [[NSString alloc] initWithData:d0 encoding:NSASCIIStringEncoding]; 501 501 502 NSString *sH = [[NSString alloc] initWithData:responseBody encoding:NSASCIIStringEncoding]; 503HTTPServer.m https://gitlab.com/base.io/io | Objective C | 761 lines
125**/ 126- (NSString *)documentRoot 127{ 127{ 128 __block NSString *result; 129 136 137- (void)setDocumentRoot:(NSString *)value 138{ 143 144 if (value && ![value isKindOfClass:[NSString class]]) 145 { 145 { 146 HTTPLogWarn(@"%@: %@ - Expecting NSString parameter, received %@ parameter", 147 THIS_FILE, THIS_METHOD, NSStringFromClass([value class]));HTTPConnection.m https://gitlab.com/base.io/io | Objective C | 1547 lines
118**/ 119+ (NSString *)generateNonce 120{ 123 CFUUIDRef theUUID = CFUUIDCreate(NULL); 124 NSString *newNonce = (__bridge_transfer NSString *)CFUUIDCreateString(NULL, theUUID); 125 CFRelease(theUUID); 245**/ 246- (BOOL)supportsMethod:(NSString *)method atPath:(NSString *)path 247{ 278**/ 279- (BOOL)expectsRequestBodyFromMethod:(NSString *)method atPath:(NSString *)path 280{ 385**/ 386- (NSString *)passwordForUser:(NSString *)username 387{AsyncUdpSocket.m https://gitlab.com/base.io/io | Objective C | 1728 lines
33 34NSString *const AsyncUdpSocketException = @"AsyncUdpSocketException"; 35NSString *const AsyncUdpSocketErrorDomain = @"AsyncUdpSocketErrorDomain"; 39// Prior to Mac OS X 10.5 this method was not thread-safe. 40static NSString *getaddrinfoLock = @"lock"; 41#endif 68// Utilities 69- (NSString *)addressHost4:(struct sockaddr_in *)pSockaddr4; 70- (NSString *)addressHost6:(struct sockaddr_in6 *)pSockaddr6; 70- (NSString *)addressHost6:(struct sockaddr_in6 *)pSockaddr6; 71- (NSString *)addressHost:(struct sockaddr *)pSockaddr; 72 87// Diagnostics 88- (NSString *)connectedHost:(CFSocketRef)socket; 89- (UInt16)connectedPort:(CFSocketRef)socket;AsyncSocket.m https://gitlab.com/base.io/io | Objective C | 1632 lines
48 49NSString *const AsyncSocketException = @"AsyncSocketException"; 50NSString *const AsyncSocketErrorDomain = @"AsyncSocketErrorDomain"; 89- (BOOL)createStreamsFromNative:(CFSocketNativeHandle)native error:(NSError **)errPtr; 90- (BOOL)createStreamsToHost:(NSString *)hostname onPort:(UInt16)port error:(NSError **)errPtr; 91- (BOOL)attachStreamsToRunLoop:(NSRunLoop *)runLoop error:(NSError **)errPtr; 116- (BOOL)areStreamsConnected; 117- (NSString *)connectedHostFromNativeSocket4:(CFSocketNativeHandle)theNativeSocket; 118- (NSString *)connectedHostFromNativeSocket6:(CFSocketNativeHandle)theNativeSocket; 118- (NSString *)connectedHostFromNativeSocket6:(CFSocketNativeHandle)theNativeSocket; 119- (NSString *)connectedHostFromCFSocket4:(CFSocketRef)socket; 120- (NSString *)connectedHostFromCFSocket6:(CFSocketRef)socket; 124- (UInt16)connectedPortFromCFSocket6:(CFSocketRef)socket; 125- (NSString *)localHostFromNativeSocket4:(CFSocketNativeHandle)theNativeSocket; 126- (NSString *)localHostFromNativeSocket6:(CFSocketNativeHandle)theNativeSocket;FMDatabase.m https://gitlab.com/base.io/io | Objective C | 1147 lines
6 7- (FMResultSet *)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray*)arrayArgs orDictionary:(NSDictionary *)dictionaryArgs orVAList:(va_list)args; 8- (BOOL)executeUpdate:(NSString*)sql error:(NSError**)outErr withArgumentsInArray:(NSArray*)arrayArgs orDictionary:(NSDictionary *)dictionaryArgs orVAList:(va_list)args; 18 19+ (id)databaseWithPath:(NSString*)aPath { 20 return FMDBReturnAutoreleased([[self alloc] initWithPath:aPath]); 22 23+ (NSString*)sqliteLibVersion { 24 return [NSString stringWithFormat:@"%s", sqlite3_libversion()]; 31 32- (id)initWithPath:(NSString*)aPath { 33 66 67- (NSString *)databasePath { 68 return _databasePath;fmdb.m https://gitlab.com/base.io/io | Objective C | 1258 lines
8 9void testPool(NSString *dbPath); 10void FMDBReportABugFunction(); 17 18 NSString *dbPath = @"/tmp/tmp.db"; 19 100 @"hi'", // look! I put in a ', and I'm not escaping it! 101 [NSString stringWithFormat:@"number %d", i], 102 [NSNumber numberWithInt:i], 115 @"hi again'", // look! I put in a ', and I'm not escaping it! 116 [NSString stringWithFormat:@"number %d", i], 117 [NSNumber numberWithInt:i], 287 while ([rs next]) { 288 NSString *aa = [rs stringForColumnIndex:0]; 289 NSString *b = [rs stringForColumnIndex:1];AppDelegate.m https://gitlab.com/base.io/io | Objective C | 545 lines
43// these were really only intended as a convenience whilst testing... 44static void forTrackerKeys(void(^block)(NSString *key, NSString *prefKey)) { 45 NSString *prefix = @"track"; 102 NSMutableDictionary *dict = [NSMutableDictionary dictionary]; 103 forTrackerKeys(^(NSString *key, NSString *prefKey) { 104 [dict setObject:[_tracker valueForKey:key] forKey:prefKey]; 106 [[defs defaults] registerDefaults:dict]; 107 forTrackerKeys(^(NSString *key, NSString *prefKey) { 108 [_tracker bind:key toObject:defs withKeyPath:[@"values." stringByAppendingString:prefKey] options:nil]; 327 328 NSString *url = [NSString stringWithFormat:@"http://127.0.0.1:%i/index.html", HTTP_PORT]; 329 [webView setMainFrameURL:url]; 350-(void)ReloadWebView { 351 //NSString *url = [NSString stringWithFormat:@"http://127.0.0.1:%i/index.html", HTTP_PORT]; 352 //[webView setMainFrameURL:url];DDFileLogger.m https://gitlab.com/base.io/mio | Objective C | 1387 lines
215 NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); 216 NSString *baseDir = ([paths count] > 0) ? [paths objectAtIndex:0] : nil; 217 NSString *logsDirectory = [baseDir stringByAppendingPathComponent:@"Logs"]; 221 NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES); 222 NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : NSTemporaryDirectory(); 223 NSString *logsDirectory = [[basePath stringByAppendingPathComponent:@"Logs"] stringByAppendingPathComponent:appName]; 401 CFStringRef fullStr = CFUUIDCreateString(NULL, uuid); 402 NSString *result = (__bridge_transfer NSString *)CFStringCreateWithSubstring(NULL, fullStr, CFRangeMake(0, 6)); 403 427 { 428 NSString *fileName = [NSString stringWithFormat:@"log-%@.txt", [self generateShortUUID]]; 429 477 478- (NSString *)formatLogMessage:(DDLogMessage *)logMessage 479{MultipartFormDataParser.m https://gitlab.com/base.io/mio | Objective C | 523 lines
42 43- (id) initWithBoundary:(NSString*) boundary formEncoding:(NSStringEncoding) _formEncoding { 44 if( nil == (self = [super init]) ){