ios - Xcode 6.3 (and 6.2) hits breakpoint on [UIFont fontWithName: size:] -
in ios application im using class (dktheme) keep fonts , images in centralised place. implementation looks this.
+ (instancetype)theme { static dktheme *_theme = nil; static dispatch_once_t oncetoken; dispatch_once(&oncetoken, ^{ _theme = [[dktheme alloc] init]; }); return _theme; } - (id)init { self = [super init]; if (self) { [self setuptheme]; } return self; } - (void)setuptheme { // code here self.smallbuttonfont = [uifont fontwithname:@"helvetica-bold" size:13.0f]; //some code here }
and when run code in device (iphone 5c, ios8.3 , ios8.2), xcode hits breakpoint on line self.smallbuttonfont = [uifont fontwithname:@"helvetica-bold" size:13.0f];
if click continue execution button, application continue running without crashing , font property(self.smallbuttonfont
) initialised.
and noticed 1 more thing, have several [uifont fontwithname: size:];
calls , breakpoint hits first time call.(if comment first 1 next method call hits break point). annoying breakpoint issue, thankful.
you have added breakpoint exception in xcode , configured break on exception types, c++ , objective-c. problem c++ code uses exceptions non-exceptional situations. may use form of flow control or returning "failure" function.
unless have specific c++ exception need debug because it's causing problem, best configure breakpoint break on objective-c exceptions , not c++ exceptions. c++ exceptions can safely ignored.
Comments
Post a Comment