1

I would like to know, if it is possible to view image (with some alpha) before table always in middle of the screen.

I have tried package the Table and the Image into Overlap Group with Size: height - Relative to Container, but then the table is not scrollable and when the height is size to fit content, the refresh image is in the middle of the layout (middle of huge table), but I need to see the refresh image until the refresh ends with possibility of scrolling the table.

Is it possible to obtain this? Thank you for some advice.

Here is my storyboard:

enter image description here

And here is my huge table on apple watch:

enter image description here

Altair
  • 325
  • 3
  • 16

1 Answers1

0

you can add two separate group for your Image and Tableview and then Hide the Image group while you want to so table view.

Below is two methods I used in Watch App for Animation while TableView Loads the data.

 //MARK:- Animation
    func startActivity() {
        main_group.setHidden(true)
        animation_group.setHidden(false)
        animation_group.setBackgroundImageNamed("single")
        animation_group.startAnimatingWithImages(in: NSMakeRange(0, 100), duration: 0.5, repeatCount: 0)
    }
    func stopActivity() {
        main_group.setHidden(false)
        animation_group.setHidden(true)
        animation_group.stopAnimating()
    }

You can use startActivity() and stopActivity() based on your needs.

Note: you need to replace Image Name according 'single' to your need.

Ketan P
  • 4,259
  • 3
  • 30
  • 36
  • But I cant hide the TableGroup with images. :( I need to see both with some alpha (when refreshing). And that is not possible I think. – Altair Aug 23 '18 at 10:54
  • you can do it as well. Apply same frame to both group and apply alpha to image group. main_group & animation_group are on same frame. – Ketan P Aug 23 '18 at 11:19
  • Sorry I dont understand it clearly. I have three groups, one parent, two for each things: table, and refresh image. When I set alpha for main_group and setHidden(false) to image_group (the refresher), the image is above the table or when the parent group is overlap, the image is in middle of whole table, so somewhere down. I need that the rotation of refresh image is fixed in center of the screen. – Altair Aug 23 '18 at 12:42
  • can you please screen shot for the storyboard. – Ketan P Aug 23 '18 at 13:42
  • 1
    Screens have been added to question description. :) Thank you. – Altair Aug 27 '18 at 07:24