Face full screen background picture, to put multiple buttons in a fixed position of the problem my solution, specifically as follows:
The picture is like this. Repeat the question: for example, I would like to place five buttons on the M U R P on the full screen background and five places to visit the official website, which requires a variety of phone models.
That's how I solved it (StoryBoard):
First: Drag 4 viewcontroller inside the storyboard, set the screen size to 3.5, 4.0, 4.7, 5.5, respectively.
Then set up the background picture separately, place the fixed button in the fixed place.
Then, when used, by judging different screen sizes to load different storyboard, the code is as follows: (Swift).
Copy Code code as follows:
Let ScreenHeight = Uiscreen.mainscreen (). bounds.size.height
var storyboards:uistoryboard = Uistoryboard (name: "Main", Bundle:nil) as Uistoryboard
if (ScreenHeight <=.) {
Viewcon = Storyboards.instantiateviewcontrollerwithidentifier ("A.") as! Firstviewcontroller
}else if (screenheight <=.) {
Viewcon = Storyboards.instantiateviewcontrollerwithidentifier ("A.") as! Firstviewcontroller
}else if (screenheight <=.) {
Viewcon = Storyboards.instantiateviewcontrollerwithidentifier ("A.") as! Firstviewcontroller
}else if (screenheight <=.) {
Viewcon = Storyboards.instantiateviewcontrollerwithidentifier ("A.") as! Firstviewcontroller
}
var Navicon:mainnavigationcontroller = Mainnavigationcontroller (Rootviewcontroller:viewcon)
The above content is for the button location configuration different iOS background introduction, I hope you like.