Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (id)initWithFrame:(CGRect)frame
- {
- self = [super initWithFrame:frame];
- if (self) {
- CGSize size = frame.size;
- [self setBackgroundColor:[UIColor colorWithRed:0.1 green:0.1 blue:0.1 alpha:1]];
- int radius = size.height * 0.3;
- if (radius < 200)
- radius = 200;
- CGRect rect = CGRectMake(size.width * 0.5 - radius * 0.5, size.height * 0.5 - radius * 0.5, radius, radius);
- projectImage = [[UIMaskedImage alloc] initWithImage:[ProjectController getImageForProject:nil] inFrame:rect withTintColor:[UIColor clearColor] anInsetRadius:6];
- int icon_size = 50;
- int icon_margin = 10;
- menuButton = [[UISVGButton alloc] initWithFrame:CGRectMake(icon_margin, icon_margin, icon_size, icon_size) svgAtPath:@"list.svg" andColor:[UIColor whiteColor]];
- [menuButton addTarget:self action:@selector(closeScene:) forControlEvents:UIControlEventTouchUpInside];
- [self addSubview:menuButton];
- backButton = [[UISVGButton alloc] initWithFrame:CGRectMake(size.width - icon_size - icon_margin, icon_margin, icon_size, icon_size) svgAtPath:@"arrow_down.svg" andColor:[UIColor whiteColor]];
- [backButton addTarget:self action:@selector(closeOptionsMenu:) forControlEvents:UIControlEventTouchUpInside];
- int icon2_size = 100;
- shareButton = [[UISVGButton alloc] initWithFrame:CGRectMake(size.width*0.5 + radius * 0.5 + icon_margin*2, size.height*0.5 - icon2_size*0.5, icon2_size, icon2_size) svgAtPath:@"share.svg" andColor:[UIColor whiteColor]];
- [shareButton addTarget:self action:@selector(shareOnSocialNetworks:) forControlEvents:UIControlEventTouchUpInside];
- deleteSaveButton = [[UISVGButton alloc] initWithFrame:CGRectMake(size.width*0.5 - radius * 0.5 - icon_margin*2 -icon2_size, size.height*0.5 - icon2_size*0.5, icon2_size, icon2_size)svgAtPath:@"delete.svg" andColor:[UIColor whiteColor]];
- [deleteSaveButton addTarget:self action:@selector(downloadCurrentProject:) forControlEvents:UIControlEventTouchUpInside];
- [self setClipsToBounds:YES];
- [self addSubview:backButton];
- [self addSubview:deleteSaveButton];
- [self addSubview:projectImage];
- [self addSubview:shareButton];
- }
- return self;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement