iOS Question backbutton font

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4X:
#if OBJC
- (void) ChangeFont {
NSShadow *shadow = [[NSShadow alloc] init];
shadow.shadowOffset = CGSizeMake(0.0, 1.0);
shadow.shadowColor = [UIColor whiteColor];

[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil]
 setTitleTextAttributes:
 @{NSForegroundColorAttributeName:[UIColor blackColor],
  NSShadowAttributeName:shadow,
  NSFontAttributeName:[UIFont boldSystemFontOfSize:12.0]
  }
 forState:UIControlStateNormal];
}
#End If

Call it when the program starts:
B4X:
Private Sub Application_Start (Nav As NavigationController)
   Dim no As NativeObject = Me
   no.RunMethod("ChangeFont", Null)
 
Upvote 0

cloner7801

Active Member
Licensed User
Longtime User
thanks Erel!
You are wonderful,

But How can I change it to my custom font?
 
Upvote 0

cloner7801

Active Member
Licensed User
Longtime User
This is not the correct way to post an error message. You should copy the text and post the text. If it is large then paste it in a text file and upload it.
Sorry Erel,
Attached
 

Attachments

  • error.txt
    46.8 KB · Views: 255
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…