Tag: ios

NSScanner working on WiFi but not 3G

I have set up an NSScanner to work on the tap of a UIButton with the following code: -(IBAction)doLoadTTData { NSString *Period1String = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource: @”Period1String” ofType: @”txt”] usedEncoding:nil error:nil]; NSString *Period2String = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource: @”Period2String” ofType: @”txt”] usedEncoding:nil error:nil]; NSString *Period3String = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource: @”Period3String” ofType: @”txt”] usedEncoding:nil […]

UITableView scrolling madness

I have a table view which gets data from a core data array. When I try to assign the value of the object “Post” to something or NSLog it the table scrolling lags. Here is my code: – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @”CellCell”; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; Post […]

Change color of cell based on value out of array iOS

Any idea what’s wrong with this: if ([status isEqualToString: @”green”]) [[cell contentView] setBackgroundColor: [UIColor colorWithRed: 200 green: 191 blue: 231 alpha: 1]]; I defined the array in the @implementation. Xcode shows the following error: no visible @interface for NSArray declares the selector isEqualToString:. The idea is that the cell background becomes green when the string […]

Change status bar text color ios other than black or white

I would like to know, is it possible to change the text color of status bar other than black or white. I check below two links where its answers are only to change black or white. What i want is green or blue or any color. Is it possible. first , Second

Is it possible to access iPhone/iPad app files without jailbreak?

I mean not in-code access. For example I have installed app (through Testflight service) and I want to view/modify its resources. I can download Library data from XCode organizer but not whole app. Maybe there is a way to download the app (to upload it back after modifications)?

XCode: How can an IBOutlet connection disappear and still exist?

How can an outlet referencing connection disappear in the connections inspector but still be there when you right-click on it and that black outlet window opens? I had a problem Swift 3: Image does not show when setting isHidden=false in which a background UIImageView did never appear when isHidden was set to false. I found […]

Cocoapods for development only

Is there a way to use a dependency only in development? I don’t want to ship the Reveal SDK :/ I’m searching for something similar to #ifdef DEBUG Can’t find anything in the cocoapods docs.

How to use NSString from NSObject class in multiple Classes (View Controllers)

This question already has an answer here: What's the best way to communicate between view controllers? 4 answers

iOS project compilation

I am working on a project accessing web service. I found a project http://d1xzuxjlafny7l.cloudfront.net/downloads/PromoTest.zip The above code include JSON library [project setting compiler = LLVM 4.2] And I tried to use partial code of that project in my project. So I copied the JSON library into my project [my project uses Apple LLVM 3.1] and […]

keyboard hides textfield for different orientation in ipad

In my iPad application, I have few textView and textField’s. When I click on textField, the keyboard covers the textField. So I am implementing the below code to move the textview up. But on rotation to portraitUpsideDown its not working fine. It slides the screen down in opposite direction. So how do I solve this […]