Is there an ActivityIndicator in WatchKit for Apple Watch?

后端 未结 8 1197
轮回少年
轮回少年 2020-11-30 07:29

Is there an ActivityIndicator (or something like it) in WatchKit for Apple Watch? How do you all give the user feedback about some longer lasting background activity?

8条回答
  •  旧巷少年郎
    2020-11-30 07:55

    In my opinion, trying to create your own Spinner is using excessive resources. If Apple thought it was a good idea, they would have suggested it.

    I would instead just have an Image that you adjust the Alpha. Use a boolean to see if you should be adding or subtracting Alpha.

    if (add)
        {
            count=count+5;
            if (count==100)
            {
                add=false;
            }
        }
        else
        {
            count=count-5;
            if (count==0)
            {
                add=true;
            }
        }
    
        float thealpha=((float)count/100);
        [self.scanb setAlpha:thealpha];
    

    }

提交回复
热议问题