@implementation
TRIPHotelXXXView{
}
- (
void
)dealloc{
SafeSuperDealloc(
super
);
}
- (id)initWithFrame:(CGRect)frame{
self = [
super
initWithFrame:frame];
if
(self) {
}
return
self;
}
- (
void
)layoutSubviews{
[
super
layoutSubviews];
CGFloat y =
0.0
;
CGRect rect = self.frame;
rect.size.height = y;
self.frame = rect;
}
+ (instancetype)xxxView:(NSDictionary *)info width:(CGFloat)width;{
TRIPHotelXXXView *view = [[TRIPHotelXXXView alloc] initWithFrame:CGRectMake(
0
,
0
, width,
0
)];
[view updateViewWithInfo:info];
return
view;
}
- (
void
)updateViewWithInfo:(NSDictionary *)info{
[self layoutSubviews];
}
#pragma mark - Action
- (
void
)onSomeActionHappened:(id)sender{
if
(_delegate && [_delegate respondsToSelector:
@selector
(actionA)]) {
[_delegate actionA];
}
}