uiviewcontroller - How to determine which scene is the current by using Swift syntax? -


i have 2 scenes need scrolled when keyboard appears. works fine when need 1 scene so. technically, think, need judgement statement in viewcontroller.swift determine scene on right now. example:

func textfielddidbeginediting(textfield: uitextfield) {      // if current scene scene_a, on scene_a     {     scrollview.setcontentoffset(cgpointmake(0, 220), animated: true)     }      //else if current scene scene_b, on scene_b     {     scroll.setcontentoffset(cgpointmake(0, 200), animated: true)     } 

or, if have smarter way solve this, please tell me. big, big here. i've been stuck hours. lot!


Comments

Popular posts from this blog

c++ - list<myClass<int> * > sort -

SoapUI on windows 10 - high DPI/4K scaling issue -

java - why am i getting a "cannot resolve method" error on getApplication? -