iOS開發 UI庫中的坑

製作UI庫中遇到編譯錯誤

file:///Users/lvshaohua/musicv/musicv/MVUPowerVUI/MVUPowerVUI/MVUCameraStoryboard.storyboard:
error: IB Designables: Failed to render and update auto layout status
for MVUDressViewController (8pQ-Ac-LWM): dlopen(MVUPowerVUI.framework,
1): no suitable image found. Did find: MVUPowerVUI.framework:
unknown file type, first eight bytes: 0x21 0x3C 0x61 0x72 0x63 0x68
0x3E 0x0A



附錯誤編譯圖:

這裏寫圖片描述



編譯boundle文件時的錯誤信息,因爲在StoryBoard中使用了自定義控件,自定義控件的.h和.m文件不在boundle中,自定義控件中使用了IB_DESIGNABLE和IBInspectable字段


#import <UIKit/UIKit.h>

IB_DESIGNABLE

@interface MVUGradientView : UIView

@property (nonatomic) IBInspectable UIColor *startColor;
@property (nonatomic) IBInspectable UIColor *endColor;
@property (nonatomic) IBInspectable CGPoint startPoint;
@property (nonatomic) IBInspectable CGPoint endPoint;

- (void)addsGradientLayer:(CGPoint)startPoint startColor:(UIColor *)startColor
                 endPoint:(CGPoint)endPoint endColor:(UIColor *)endColor;
@end

這裏寫圖片描述

這裏寫圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章