Tag: ios

Attempt to dismiss from view controller while a presentation or dismiss is in progress

I have TWO UIViewController classes, where in FirstClass i have an UIButton for Login, when user taps on button, i will display SecondClass… For that i have done, SecondClass *index = [[SecondClass alloc] init]; [self presentModalViewController:index animated:YES]; In SecondClass i have a logout button, which will redirect to FirstClass, for that i have done, [self […]

Does NSNotificationCenter removeObserver: deregister a VC from receiving MemoryWarning Notifications?

I just stumbled about an issue in my app: I tested the didReceiveMemoryWarning calls to an UIViewController including the follow-up calls for viewDidUnload. This used to work fine in older versions of my app, but was not working now within iPhone Simulator: didReceiveMemoryWarning was just not called any more. This was caused by calling [NSNotificationCenter […]

Illegal configuration. Connection “cell” cannot have a prototype object as its destination

I have 2 errors “Illegal configuration. Connection “cell” cannot have a prototype object as its destination” Connections dont duplicate, cells are empty, without other controls in them. I try to clean project and rebuild it, but it didnt help me. How can I fix it? Thank you

How to change color of detail disclosure button for table cell

I want to change the color of detail disclosure button of a table cell. Thanks in advance.

change NSDate from one time zone to another

Given a date in NSString like “2012-12-17 04:36:25” (which is GMT) how one can simply change it to other time zones like EST, CST All the steps I saw so far took so many unnecessary steps

iOS 7 MPMoviePlayerController seek forward button brings the video to the End and displays Black screen

I am facing an issue with MPMoviePlayerController in iOS 7. I enter the fullscreen and then click (just a single tap) on seek forward button (>>|) , and the video playback ends and gives a black screen with a text “Loading” on the header. I registered notification for “MPMoviePlayerPlaybackStateDidChangeNotification“. **[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayerPlaybackStateDidChange:) name:MPMoviePlayerPlaybackStateDidChangeNotification object:self.player];** […]

Suitable key for NSDictionary

Is there a way to determine if a class is suitable as a key and will work as you expect, for example I want to use NSIndexPath as a key in NSDictionary but I don’t know for certain if two different NSIndexPath instances with the same integer values will always return the same hash value.

Consequences of “Embedded dylibs/frameworks only run on iOS 8 or later” warning

With Xcode 6.x we can use CocoaTouch Framework template to build a framework library and Xcode will create the .framework for us when we build, which is awesome. In our framework we want to support iOS 7.1 and up, so for Deployment Target (in our framework) we specified 7.1. Now when we build we see […]

setting UIButton font

I have the following code for setting up text in a UIButton [self.fullListButton_ setTitle:[NSString stringWithFormat:@”%d”, [self.newsfeedItem_.newsfeedToSubjects count] – 3] forState:UIControlStateNormal]; The issue is I can’t seem to set the font for this. How do I do so?

Changing the background color on a UITableViewHeaderFooterView loaded from a xib says to use contentView.backgroundColor instead

I’m creating a UITableViewHeaderFooterView from a xib file, and almost everything is working properly. The problem is that now when I try to change the background color (or if I had one configured in the xib), it will constantly output this message to the console: Setting the background color on UITableViewHeaderFooterView has been deprecated. Please […]