iOS Question How to build a B4i App like iOS8 Safari 3D-View?

Discussion in 'iOS Questions' started by Ju Yang, Jul 16, 2015.

  1. Ju Yang

    Ju Yang Active Member Licensed User

    I am a B4i Beginner, Our company have a small project,
    Need to develop a B4i App like iOS8 Safari 3D-View (and the animation effect must like Safari 3D View).

    I knew Xamarin.iOS Code, it need use CoreAnimation Namespace's classes,
    and Use UIView class to implement,
    But in B4i, even I don't know what is the 'UIView' in B4i.

    I need some idea, and I want to get more B4i tutorial documents.

    See the pictures.
     

    Attached Files:

  2. Ju Yang

    Ju Yang Active Member Licensed User

  3. Erel

    Erel Administrator Staff Member Licensed User

    B4i View is the same as native iOS UIView. You will need to use the inline objective c code feature to create such an animation.

    The B4i API only includes 2d animations for now.
     
  4. Ju Yang

    Ju Yang Active Member Licensed User

    It means I can't use Basic code to make the 3D View now?
     
  5. JanPRO

    JanPRO Well-Known Member Licensed User

    Right, but you can use inline objective c code like Erel already said.

    For example (a simple rotation):

    Code:
    Dim NaObj As NativeObject = Me
      NaObj.RunMethod(
    "Animation:",Array(Panel1))


    #If OBJC
    - (void)Animation: (UIView *)someView {

    CATransform3D rotationAndPerspectiveTransform = CATransform3DIdentity;
    rotationAndPerspectiveTransform.m34 = 1.0 / -1000.0;
    rotationAndPerspectiveTransform = CATransform3DRotate(rotationAndPerspectiveTransform, M_PI * 0.6, 1.0f, 0.0f, 0.0f);
    [UIView animateWithDuration:1.0 animations:^{
      someView.layer.anchorPoint = CGPointMake(0.5, 0);
      someView.layer.transform = rotationAndPerspectiveTransform;
    } completion:^(BOOL finished){
      // code to be executed when flip is completed
    }];

    }
    #End If
    based on: http://stackoverflow.com/questions/15374215/simple-core-animations-3d-transform-of-uiview


    Use Core Animations for 3D animations.
     
    Erel likes this.
  6. Ju Yang

    Ju Yang Active Member Licensed User

    when time the B4i have 3d animations?
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    There are no public dates for future features.
     
  8. Ju Yang

    Ju Yang Active Member Licensed User

    now ,i use this code ,however ,it just rotate one panel .if i want to rotate several panels .how to do it
     

    Attached Files:

Loading...