ios - How to implement a slide in/out menu on only a part of the viewcontroller in Swift? -


i want implement slide menu indicated in picture bellow. after user presses button, want create animation slides label , image (1) right slides 2 images (2) in.

enter image description here

i have far managed slide label , image (1) right using:

self.mylabel.center.x -= self.view.bounds.width self.myimage.center.x -= self.view.bounds.width 

but can't find solution bring view #2 in ...

i not looking specific code (although nice :) rather point me right direction.

so, first put label , image inside own uiview make manipulating them easier (though don't know rest of ui maybe that's not idea).

i think problem might not how slide them (as say, you've worked out how slide things about);

self.mylabel2.center.x += self.view.bounds.width self.myimage2.center.x += self.view.bounds.width 

will it.

is problem how position them off screen in first place?

if want them end in same place initial label , image can use starting position guide.

in viewdidload

self.mylabel2.center.x = self.mylabel2.center.x - self.view.bounds.width self.myimage2.center.x = self.myimage2.center.x - self.view.bounds.width 

this position them 1 screen width left of original label , image.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -