// // NoContentView.m // kneet // // Created by Jason Lee on 06/03/15. // Copyright (c) 2015 ncomz. All rights reserved. // #import "JDObject.h" #import "NoContentView.h" #import "CustomLabel.h" @interface NoContentView () { KNMenuId _menuId; } @end @implementation NoContentView + (id)viewFromNib { NoContentView *noContentView = nil; for (UIView *view in [CommonUtil nibViews:@"NoContentView"]) { if ([view isKindOfClass:[NoContentView class]]) { noContentView = (NoContentView*)view; noContentView.backgroundColor = [UIColor clearColor]; noContentView.lblTitle.text = NSLocalizedString(@"죄송합니다\n현재 항목의 리스트가 존재하지 않습니다", @"죄송합니다\n현재 항목의 리스트가 존재하지 않습니다"); } } return noContentView; } - (void)setText:(NSString *)text { _lblTitle.text = text; // CGFloat height = [CommonUtil getLabelRealHeight:_lblTitle]; // _constraintLabelHeight.constant = height; } - (void)setLink:(NSString *)link wishMenuId:(KNMenuId)menuId { _menuId = menuId; [_lblTitle setLink:link]; [_lblTitle addTarget:self action:@selector(gotoLink:)]; } - (void)gotoLink:(id)sender { [[JDFacade facade] gotoWishMenu:_menuId]; } @end