ViewUtil.h 680 B

1234567891011121314151617181920212223242526
  1. //
  2. // ViewUtil.h
  3. // JChat
  4. //
  5. // Created by HuminiOS on 15/7/23.
  6. // Copyright (c) 2015年 HXHG. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIKit.h>
  10. #define NIB(x) (x *)[ViewUtil nib:#x]
  11. #define NIB_OWN(x, y) (x *)[ViewUtil nib:#x owner:y]
  12. #define REG_NIB(x, y) [ViewUtil table:x registerNib:#y]
  13. #define CELL(x, y) (y *)[ViewUtil table:x nib:#y]
  14. @interface ViewUtil : NSObject
  15. + (UIImage *)colorImage:(UIColor *)c frame:(CGRect)frame;
  16. + (UIView *)nib:(char *)nib;
  17. + (UIView *)nib:(char *)nib owner:(id)owner;
  18. + (UITableViewCell *)table:(UITableView *)table nib:(char *)nib;
  19. + (void)table:(UITableView *)table registerNib:(char *)nib;
  20. @end