Solve the strange splash screen problem caused by hidden app return button text under IOS9

Source: Internet
Author: User

The problem is caused by a single line of code that hides the text of the app's return button.

Look at the code with the problem:

//将返回按钮的文字position设置不在屏幕上显示 [[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(NSIntegerMin, NSIntegerMin) forBarMetrics:UIBarMetricsDefault];

The function should be to the return button title infinite negative offset, so that the return button title disappears in the screen display area infinity.

Solutions: 1

Set the return button title to Transparent color

[[UIBarButtonItem appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor clearColor]}                               forState:UIControlStateNormal];

Solutions: 2

Set the return button title to Transparent color

 
   The Kscreenwidth and kscreenheight are screen widths and heights, respectively.
 
   [[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(-kScreenWidth, -kScreenHeight) forBarMetrics:UIBarMetricsDefault];
 

Solve the strange splash screen problem caused by hidden app return button text under IOS9

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.