Cast shadows on the Alarm tab on iPhone Clock

The watch application that ships with the iPhone has a tab for setting alarms. In this view, each instance of the UITableViewCell has a shadow around them. Does anyone know how to achieve the same effect?

It also looks like the tab bar at the bottom also has an inscription.

It would be helpful to appreciate ideas on how to achieve the same look.

+3
source share
3 answers

I was wondering how to do this, and it just occurred to me to use the UITableView footer:

myTableView.tableFooterView = myCustomViewWithDropShadowImage;
+2
source

, , , dropshadow. ( ), , , , UITableview, - - .

0

, 100% (, 320 x 40 ) 4 UIImageView. , . , , , , :

UIImageView* bottomShadow = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"BottmShadow.png"]] 
bottomShadow.transform = CGAffineTransformMakeScale(1, -1);

( )

, . :

CGRect tableTopShadowFrame = tableTopShadow.frame;
tableTopShadowFrame.origin.y = -(tableTopShadowFrame.size.height);
[tableTopShadow setFrame:tableTopShadowFrame];

( . , , ).

Finally, you need to set the backgroundColor property of the table to transparent.

tableView.backgroundColor = [UIColor clearColor];

and maybe set some dark gray color of the main background image.

0
source

Source: https://habr.com/ru/post/1709865/


All Articles