iOS Question Page rotation

D

Deleted member 103

Guest
Hi,

with this Android code you can rotate an activity into an axis. Is there a function under iOS?

B4X:
Public Sub setRotationY(v As View, Angle As Float)
    Dim jo = v As JavaObject
    jo.RunMethod("setRotationY", Array As Object(Angle))
End Sub
 
D

Deleted member 103

Guest
Hi Erel,

you misunderstood me.
The code above mirrors the activity around the Y-axis just like a mirror.
 

Attachments

  • mirror.png
    mirror.png
    80.6 KB · Views: 298
Upvote 0

ilan

Expert
Licensed User
Longtime User
you could try this:

B4X:
Sub SetScaleTransformation(v As View, x As Float, y As Float)
    Dim no As NativeObject = Me
    no.RunMethod("SetScaleTransformation:::", Array(v, x, y))
End Sub

#if ObjC
- (void) SetScaleTransformation:(UIView*) view :(float)x :(float)y {
   view.transform = CGAffineTransformMakeScale(x, y);
}
#End if

USE on the whole screen:

B4X:
SetScaleTransformation(Page1.RootPanel,-1.0,1.0)
 
Upvote 0
D

Deleted member 103

Guest
you could try this:

B4X:
Sub SetScaleTransformation(v As View, x As Float, y As Float)
    Dim no As NativeObject = Me
    no.RunMethod("SetScaleTransformation:::", Array(v, x, y))
End Sub

#if ObjC
- (void) SetScaleTransformation:(UIView*) view :(float)x :(float)y {
   view.transform = CGAffineTransformMakeScale(x, y);
}
#End if

USE on the whole screen:

B4X:
SetScaleTransformation(Page1.RootPanel,-1.0,1.0)
Thank you ilan! :)
I'll try it tonight.
 
Upvote 0
Top