Tag: ios

iOS: Saving managed object context takes over 1 second after a while

Strange problem, and strangely only since yesterday. I have a fetched results controller in which you can reorder the rows without any problem. After a fresh start of the app, everything works fine and fast. However if you change from this tab bar to another tab bar and edit some random textfield (which isn’t even […]

Memory not being released right even dealloc method is called after dismissing view controller

What am I doing is I am creating lots of UIView in the background and keep them in a NSMutableArray to use later. But when I dismiss the view controller I check the memory in Xcode and it seems some of memory not being released. I checked; view controller is being deallocated. Check please: This […]

App freezes on main thread on iPhone 5c but not on iPhone 6s

I’m working on an app with a navigation controller. Swift + objective C Important note: This freeze happens 100% when testing on iPhone 5c and never happens when testing on iPhone 6s The scenario is: Go to TableViewController A Touch an item of the list to reach TableViewController B Go back to TVController A by […]

Bug when swiping from view with uinavigationbar to one without

I have an application with 2 viewcontrollers, ViewController and NextViewController. ViewController does not have a navigation bar and has a white status bar. NextViewController does have a navigation bar and has a black (default) status bar. I have encountered a bug when swiping back to ViewController from NextViewController and cancelling the swipe where the navigation […]

How can we store a username-password combination in keychain in encrypted format

I need to implement offline login in my application.Currently I am storing passwords in keychain which have been used to login at least once when the app is online.But right now I am not checking the username password combination. If I have multiple users for a single device , storing only passwords won’t be enough. […]

application:didReceiveRemoteNotification:fetchCompletionHandler: not in UIApplicateStateBackground when called

I’ve been puzzled by this for weeks and still no idea what’s going on. The app is setup with background mode to play audio and fetch data. The app is backgrounded and the screen is on lockscreen. The method application:didReceiveRemoteNotification:fetchCompletionHandler: gets called when a remote push arrives. The odd thing is that the application state […]

UIKit or CoreGraphics memory leak

It looks like I am experiencing memory leaks in Cocoa libraries? Is it possible? What are your experiences? How can I eventually fix them? leaks http://www.objectivec.cz/transfer/memoryleaks.png

Call class method on object of unknown class

I added a set of classes to an array, all which I know have the same superclass: [array addObject:[Africa class]]; [array addObject:[Brazil class]]; [array addObject:[France class]]; Later, I want to get the class object and call a superclass class method on it. Something like this: Class class = [array objectAtIndex:1]; (Country class) specificClass = class; […]

EXC_BAD_ACCESS after converting HTTP response to string

I have the following code, from which I am getting an EXC_BAD_ACCESS error: – (void)connectionDidFinishLoading:(NSURLConnection *)connection { NSString *responseString = [[NSString alloc] initWithData:receivedData encoding:NSUTF8StringEncoding]; NSLog(responseString); } The weird thing is, the bad access error is actually coming from the NSLog() line, when it tries to access responseString. I’ve even tried adding a retain or autorelease […]

Managing resources in a universal ios app

I am developing a cocos2d game. I need to make it universal. Problem is that I want to use minimun amount of images to keep the universal binary as small as possible. Is there any possibility that I can use same images I am using for iphone, retina and iPad somehow? If yes, how can […]