11/24/2023 0 Comments Status bar ios landscape![]() The following code gets the bounds of the navigation bar and adds the height of the status bar to those bounds. ![]() We want our gradient image to extend into the status bar. ![]() To get the proper size, we need to know the size of the navigation bar plus the size of the status bar (the area where the carrier signal and clock is). The first step of creating a gradient is to construct a CAGradientLayer class and give it the proper size, colors, and positions. In this post, I will show you how to add a gradient background to your UINavigationBar that works for both portrait and landscape orientations. ![]() At first, I thought it would be easy, but I soon discovered a problem when I rotated my device to landscape orientation and the gradient on the navigation bar did not resize. On a recent project, I had to add a gradient background to a UINavigationBar.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |