So I’m using a custom font and I have added it to Info.plist and I used the
Dim cusFont as new iOSFont(“Bebas Neue”, 32)
Label1.TextFont = cusFont
and it worked correctly with the emulators and the devices I had (all 64-bit), until I tried it in an iPhone 5c 32-bit device which crushes immediately.
If I comment out the code and build it, the app has no problem.
Is there another method or a different way to go about using the font?
I tried using fontWithName and I can get a ptr to point there but I have no idea how to continue.
fontWithName is useful for setting a custom font to a TableCell Label and DetailLabel.
[code]Declare Function getTextLabel Lib “UIKit” selector “textLabel” (obj_ref As ptr) As ptr
Declare Function getDetailTextLabel Lib “UIKit” selector “detailTextLabel” (obj_ref As ptr) As ptr
Declare sub setFont lib UIKitLib selector “setFont:” (obj_ref as ptr, fontRef as ptr)
Dim label As Ptr
label = getTextLabel(cell.Handle)
It’s the first time I’m making an iPhone app so I cannot fully understand the crashlog. I googled a lot, tried various things and then I went with commenting everything out and seeing where it crashes.
I’m not sure what that crash log has to do with the font, but it does show that there is an unhandled exception. You could try catching that exception and seeing if you can get some more relevant info based on what the specifics of that exception are.
So it was that I was not copying the tff file after the build. I just had the file drag and drop into the project and it worked for most phones but not for this. Now it works great.