简体   繁体   中英

iOS Navigation Right Bar Button Item - icon changed after dialog

I have hamburger icon in Navigation bar set in Interface builder.

右栏按钮-界面构建器

I have it in multiple controllers and everything looks ok. The problem is when I show alert dialog:

class func showSimpleAlert(parent:UIViewController, title:String, message:String) {
    let alert = UIAlertController(title: title, message: message, preferredStyle: .Alert)
    alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil))
    parent.presentViewController(alert, animated: true, completion: nil)
}

Then icon is changed to this:

汉堡图标问题

Why is that? Why I get that line there?

Size of my hamburger icon is 45 × 34 and I have it in Xcode Image Assets. Thanks for help

I got the same problems. Solution: Remove the "item" (Title field in your first picture) will help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM