andreamazz / SlideOutNavigation

SlideOut Navigation Controller for iOS.
MIT License
210 stars 49 forks source link

Doesn't work under XCode 5, but iOS 6.* simulator #43

Closed aksonov closed 10 years ago

aksonov commented 10 years ago

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString sizeWithAttributes:]: unrecognized selector sent to instance 0x9c74440' *\ First throw call stack: (0x2f42012 0x2d67e7e 0x2fcd4bd 0x2f31bbc 0x2f3194e 0x280dd0 0x2799fa 0x1b838fb 0x1b839cf 0x1b6c1bb 0x1b6a872 0x1b755d4 0x1b781c4 0x1b78546 0x278d5e 0xaaad 0x1baa1c7 0x1baa232 0x1bb5c25 0x1db53a3 0x1bb2ee3 0x1bb3167 0x1bb31a7 0x2164dd 0x979a6 0x9876a 0x26385e 0x2644b1 0x365653f 0x3668014 0x36587d5 0x2ee8af5 0x2ee7f44 0x2ee7e1b 0x3b627e3 0x3b62668 0x1ac8ffc 0x257d 0x24e5 0x1) libc++abi.dylib: terminate called throwing an exception

Because following code is wrong (__IPHONE_7_0 is defined, but it doesn't mean that iOS7 is used!)

ifdef __IPHONE_7_0

    CGSize fontSize = [text sizeWithAttributes: @{NSFontAttributeName: self.options[AMOptionsCellBadgeFont]}];

else

    CGSize fontSize = [text sizeWithFont:self.options[AMOptionsCellBadgeFont]];

endif

andreamazz commented 10 years ago

Yep, you're right, I should have checked that pull request more thoroughly. I'll push the fixed version tomorrow with other fixes.

andreamazz commented 10 years ago

Fixed in 38a981d