Add UIActivityIndicatorView into UIBarButton

后端 未结 6 1559
忘了有多久
忘了有多久 2021-02-01 03:00

How do I add a UIActivityIndicatorView spinner circle into a UIBarButton, so that when a user taps on one of those buttons on the navigation bar, they see a spinner while the lo

6条回答
  •  孤城傲影
    2021-02-01 03:42

    pseudocode, i'm not going to check this in Xcode, but something like this should work:

    UIActivityIndicatorView *act = [[UIActivityIndicatorView alloc] init];
    act.frame = CGMakeRect(3,3,25,25);
    [myBarButton addSubview:act];
    [act release];
    

提交回复
热议问题