Tag: cocoa touch

Thread 1: EXC_BREAKPOINT (code=EXC_i386_BPT, subcode=0x0) error

I have an iPad app I am making, but it crashes on startup even though there are no errors or warnings, the output doesn’t output anything besides “(lldb)”, and it marks a pointer. This is the image of the post build crash. And here is the code: – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { /* UIImage […]

When does Core Data Nullify rule update relations?

What I have and want: I have a one-to-many relationship A <—>> B (the to-many part is ordered). When deleting A all B’s with a relation to A should be deleted as well, so the deletion rule for A’s relation to B is set to cascade -> Works fine When deleting B only the relationship […]

Replacement for `fabs`, `fmax`, etc. for use with CGFloat on 64-bit iOS devices

Question Consider layout code like this: CGFloat descriptionHeight = // height of a paragraph of text with zero or more words; CGFloat imageHeight = // height of an image; CGFloat yCoordinateOfSomeOtherView = fmax(descriptionHeight, imageHeight) + 5.0f; How should the third line be rewritten with support for 64-bit iOS devices? (The current code doesn’t take into […]

Warning about blocking item under version control (Xcode 4)

I just added TouchXML to my project and it’s telling me that: warning: Obstructing: /**/Classes/Creation is blocking item under version control also, same thing for Tidy: warning: Obstructing: /**/Classes/Tidy is blocking item under version control It’s just a warning but it’s very annoying; how can I get rid of it?

Is it possible to check whether an identifier exists in a storyboard before instantiating the object?

In my code I have this line, but I was wondering if there is way to check whether @”SomeController” exists before I use it with the “instantiateViewControllerWithIdentifier” method. If the identifier doesn’t exist then the app crashes. It’s not a huge problem if there isn’t a good way to do it, I can just be […]

UIPageViewController didFinishAnimating not called if swiped quickly

I have a UIPageViewController that works as expected. I can scroll left and right and the delegate method didFinishAnimating is called when I scroll each direction. However, if I scroll too quickly I end up on a page where didFinishAnimating is not called, though it is called for all previous pages. Does anyone know why […]

Why does a false assertion in async test in GHUnit crash the app instead of just failing the test?

This question has very few views and no answers yet. If you have a suggestion what to change about this question to get more eyeballs, I’d be happy to hear them. Cheers! I’m using GHAsyncTestCase to test a custom NSOperation of mine. I’m setting the test case as a delegate on the operation object and […]

Get UIViewController class name in iOS

I am getting viewControllers on navigationController stack as follows. Now I need to check if controller on top is one of known vc. How to get vc class name in order to compare it? Thank you. NSArray *viewContrlls=[[self navController] viewControllers]; [viewContrlls lastObject] something like, if ([[viewContrlls lastObject] name] isEqualToString @”viewControllerName”){

Stop UITableView over scroll at top & bottom?

I am using a UITableView with UITableViewCells and I want to stop the “over” scroll that you get at the top and bottom of the list, The bit where you can pull down on the very top cell to show the background (sometimes used to refresh) Is there anyway to just make the top edge […]

How to programmatically turn off Auto Correction in iphone sdk?

Possible Duplicate: iPhone Programming: Deactivate spell check in UITextView I am creating a spelling quiz app. When I type in text in textbox, because auto-correction is ON it shows the correct answer. I would like to do either of following: (a) Programatically turn OFF Auto-Correction OR (b) Give user the option to manually turn OFF […]