askoruli

u/askoruli


r/iOSProgramming•

I'm trying to animate between 2 states of my UICollectionView layout and I'm having trouble getting it to happen smoothly. The cell frames animate smoothly but the contents are snapping between cell sizes.

I've setup a repository and an example which demonstrates the issue as simply as I can: https://github.com/skorulis/LayoutTest

Anyone have any tips on how to solve this? It seems like it's something that should be simple but so far I haven't had any luck in finding a solution.

24


r/iOSProgramming•

I'm using the app delegate didReceiveRemoteNotification to fetch content using AFNetworking / NSURLSession with standard data tasks:

-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo     fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
    //Get content here
}

I thought this was working fine but have found various cases where the app delegate method is never called. These are the circumstances I've mapped out:

  • When the app is open it is always called
  • When the app is run from the debugger it is always called
  • When monitoring the device logs (via idevicesyslog) it is always called
  • When plugge
210

r/iOSProgramming•

I've found quite a few bugs in my app by tapping the screen extremely quickly so that a second event gets processed before the first has finished executing. Things like pushing and popping a view controller at the same time can put the app into a state with unpredictable results.

I've started solving these by adding flags to control it. So when I handle a push event I set a flag to ignore any subsequent push or pop events until the view appears again when I clear it.

This is solving the problem but it feels very much like a hack and also quite brittle. If I make a mistake in the view controller life cycle I may end up with buttons not working since the flag is in an incorrect state.

Has a

312

r/iOSProgramming•

So I've got one crash that comes up more often than any other crash but still very sporadically and I've never been able to reproduce it myself. The stack trace I get gives me no clues as to what has gone wrong. What I really want to know is how to go about tracking something like this down. Normally I at least know where the code crashed and I can start investigating from there, in this case all I know is the error type. I understand that there's a memory problem somewhere but how do I know where to start looking?

Here's the information I get from HockeyApp

Reason: objc_msgSend() selector name: performSelector:withObject:withObject:
Exception Type: SIGSEGV 
Exception Codes: SE
12