我正在向MainComponentView
用户控制器添加自定义视图 ( )。现在,MainComponentView
我还添加了一个自定义视图 ( FirstPartView
) 并且FirstPartView
' 的高度应该小于MainComponentView
' 的高度。我的问题是,当我给的高度MainComponentView
小于FirstPartView
高度时,它仍然向我展示FirstPartView
.
// MainComponentView
self.aComponent = [[MainComponentView alloc] initWithFrame:CGRectMake(212, 0, 600, 550)
withStartDate:startDate
endDate:endDate];
[self.view addSubview:self.aComponent];
并将自定义视图添加到MainComponentView
:
self.aFirPartView = [[FirPartView alloc] initWithFrame:CGRectMake(0, self.frame.origin.y, self.frame.size.width, HEIGHT_OF_COMPONENT1) withStartDate:startDate endDate:endDate];
[self addSubview:self.aFirPartView];`