你好,我自定义了一个像对话框一样的290*280视图,一切正常,但是我的自定义视图后面的其他视图可以点击,我想当我的customView弹出时可以点击其他视图,我也想要我后面的窗口自定义视图模糊。
我的代码是:
#import <UIKit/UIKit.h>
@interface RecordView :UIView
@property (strong, nonatomic) IBOutlet UIButton *confirmBu;
@property (strong, nonatomic) IBOutlet UIButton *playBu;
@property (strong, nonatomic) IBOutlet UIButton *recrodBu;
@property (strong, nonatomic) IBOutlet UIButton *closeBu;
@property (strong, nonatomic) IBOutlet UIImageView *backgroundImageview;
@property (strong, nonatomic) IBOutlet UIImageView *showImageview;
-(void)setViewStyle;
@end
#import "RecordView.h"
@interface RecordView ()
@end
@implementation RecordView
@synthesize confirmBu;
@synthesize playBu;
@synthesize recrodBu;
@synthesize closeBu;
@synthesize backgroundImageview;
@synthesize showImageview;
-(void)setViewStyle{
self.frame=CGRectMake(15,100, 290, 280);
self.backgroundColor=[UIColor clearColor];
backgroundImageview.layer.masksToBounds=YES;
backgroundImageview.layer.cornerRadius=15.0;
backgroundImageview.layer.borderWidth=4.0;
backgroundImageview.layer.borderColor=[[UIColor lightGrayColor] CGColor];
}
@end
self.recordDialog= [[[NSBundle mainBundle] loadNibNamed:@"RecordView" owner:self options:nil]lastObject];
[self.recordDialog setViewStyle];
[delegate.window addSubview:self.recordDialog];