Page 1 of 1

screen rect with group

Posted: Mon Dec 09, 2013 12:23 am
by vedus
in my app i have many fields so i need to scroll the fields up to see it when is covered by the keyboard.
my problem is,and i have attach the photos for more accurate solution :D
i use this code for my screen rect..

Code: Select all

local inputID

on openCard
   if environment() = "mobile" then
      /* create the UITextField control  and place its unique ID 
      into a local variable that I have called inputID */
      iphoneControlCreate "input"
      put the result into inputID
      
      /* the bounds of the UITextField are determind by the bounds the rect of grc 2 */
      iphoneControlSet inputID, "rect", the rect of grc 2
    
            set the loc of group "myscroll" to 512,561
   end if
end openCard

on keyboardActivated
      set the visible of grp mygrp2 to false
   move group "myscroll" to 512,200 in 100 millisecs

   iphoneControlSet inputID, "rect", the rect of grc 2
end keyboardActivated

on keyboardDeactivated
   move group "myscroll" to 512,561 in 200 millisecs
      set the visible of grp mygrp2 to true
  
   iphoneControlSet inputID, "rect", the rect of grc 2
end keyboardDeactivated
if you see in the first photo i have 2 colors green number(group-1) blue(group-2)
colorp.png
when i click in the blue screen the rect is working nice and smooth ,and because is up of others field from above screen (green) i use the visible to false.(i don't know if is right but is help for now.
now the problem..
when i click in the green screen is flickering.. :(
what i am do wrong?
i have try to group all the fields in the screen ,but the result was,when i click a every fld the screen move to the loc of group-1
iOS Simulator Screen shot Dec 9, 2013, 1.09.06 AM.png

Re: screen rect with group

Posted: Mon Dec 09, 2013 11:02 pm
by Mark
Hi,

I don't understand it. The rect is working smooth and nice, you write. Which rect? What does it do?

You also write that it is flickering. What is flickering? The rect, the field, The keyboard or something else?

When you click in the green/blue screen, do you mean you're clicking in a field or somewhere else?

Why do you create only one native UITextField if you have so many fields?

Kind regards,

Mark