Tag Archives: puzzles

Managed Object Context arrives empty when passed via a segue in iOS 5

I’ve just found that passing an NSManagedObjectContext object via a segue in iOS 5 doesn’t work: the property remains empty.

In iOS 6 on the other hand this isn’t a problem: the context arrives just like any other property would, and as logic would dictate. Here’s code from an amended Utility Template app:

Trying to execute a Fetch Request on FlipsideViewController results in this error message:

+entityForName: could not locate an NSManagedObjectModel for entity name ‘YourEntity’

The fact that this is fixed (yet completely undocumented) means that Apple knew about this and made it work in iOS 6. Why this doesn’t work in iOS 5 is anyone’s guess.

I’m trying to read out the value of…

I’m trying to read out the value of a UISlider and put it into a UIProgressView. Not a problem, all I need is to divide my UISlider.value by 100 to get the correct output. So far so good.

However, for some reason this statement does not work. I don’t know why:

Doesn’t make sense. All I’m doing is dividing the self.mySlider.value by 100, giving me the value that I need. If I do it by passing this value into a variable which I divide by 100 it works perfectly fine: