1. 程式人生 > >iOS開發 UI庫中的坑

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

這裡寫圖片描述

這裡寫圖片描述