我应该在哪里放置视图构建器方法方法?

时间:2019-06-21 12:35:12

标签: ios objective-c model-view-controller mvvm refactoring

我正在将应用程序从MVC重构为MVVM,并且具有返回UIView *的方法。我应该在哪里放置这种方法?是在View还是ViewController上。

- (UIView *)viewWithText:(NSString *)titleString {
    // code that build a UIView* without any communication with view model
}

- (UIView *)buildView :(NSString *)titleString {
    // code that build UIView* with communication with view model
}

0 个答案:

没有答案