3

イメージ ピッカー コントローラーに MBProgressHUD ビューを挿入しました。写真を撮るための指標として機能するはずです。そのために、以下のように MBProgressHUD をカスタマイズしました。

- (void) drawRect:(CGRect)rect {
...
CGRect allRect = self.bounds;
UIImage* image = [UIImage imageNamed:@"loadingScreen.png"];
[image drawInRect: allRect];
...
}

私はこのカスタマイズ コードをあらゆる場所でテストしましたが、常に成功しています。しかし、UIImagePickerController では、インジケーターのみを表示し、画像を表示しない "loadingScreen.png" では機能しません。

...
HUD = [[MBProgressHUD alloc] initWithView:imgPicker.view];
[imgPicker.view addSubview: HUD];
...

それを解決するのを手伝ってください。

4

1 に答える 1

0
...
HUD = [[MBProgressHUD alloc] initWithView:self.view]; // thats not the custom view
HUD.customView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"loadingScreen.png"]];
HUD.mode = MBProgressHUDModeCustomView;
[HUD show:YES];
...

「loadingScreen.png」は静止画像として表示されることを忘れないでください。

于 2014-05-14T10:38:12.063 に答える