0
Obj-Cで書かれたカスタムActivityIndicatorViewを使用しようとしています。インジケータをUIViewフレームにセンタリングするために必要なメソッドが含まれています。スウィフトコードで問題を使用しています。ここでは... GitHubのにSwiftのMONActivityViewメソッドを変換する方法
- (void)placeAtTheCenterWithView:(UIView *)view {
[self.view addConstraint:[NSLayoutConstraint constraintWithItem:view
attribute:NSLayoutAttributeCenterX
relatedBy:NSLayoutRelationEqual
toItem:self.view
attribute:NSLayoutAttributeCenterX
multiplier:1.0f
constant:0.0f]];
[self.view addConstraint:[NSLayoutConstraint constraintWithItem:view
attribute:NSLayoutAttributeCenterY
relatedBy:NSLayoutRelationEqual
toItem:self.view
attribute:NSLayoutAttributeCenterY
multiplier:1.0f
constant:0.0f]];
}
リンクは、私はスウィフトにこれを使用することができますどのようにhttps://github.com/mownier/MONActivityIndicatorView
コードですか?