What happened to “HelveticaNeue-Italic” on iOS 7.0.3

后端 未结 10 1510
说谎
说谎 2020-12-07 09:19

Just upgraded my iPod touch to iOS 7.0.3 and \"HelveticaNeue-Italic\" seems to have disappeared. When I query on the phone with:

[UIFont fontNamesForFamilyN         


        
10条回答
  •  时光说笑
    2020-12-07 10:02

    I had a same crash which used be to crash in iOS 7.0.3 & 7.0.4 only, and works perfectly in all other versions. After so much investigation, I came to know that @"HelveticaNeue-Italic" is not available in iOS 7.0.3 & 7.0.4 versions, so that I used to get above crash in those versions.

    I have fixed the issue with below code, this might helpful to someone needy.

    self.headerFont = [UIFont fontWithName:@"HelveticaNeue-Italic" size:16.0f];
    if (self.headerFont == nil) {
        self.headerFont = [UIFont fontWithName:@"HelveticaNeue" size:16.0f];
    }
    

    The crash log is:

    [__NSCFConstantString pointSize]: unrecognized selector sent to instance 
    

提交回复
热议问题