Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

skyfox

macrumors newbie
Original poster
Jul 18, 2008
17
0
CALLING ALL JAILBREAK TWEAK DEVS!

I found this chunk of code, it;s supposedly about adding a layer to the springboard which contains icon shadows, and animates them according to the parallax motion of the device (like how the wallpaper moves).

Can anyone confirm this/whip it up into a quick .deb?

(void)viewDidLoad { [super viewDidLoad]; self.view.layer.masksToBounds = NO; self.view.layer.cornerRadius = 2; // if you like rounded corners self.view.layer.shadowOffset = CGSizeMake(1, 1); self.view.layer.shadowRadius = 2; self.view.layer.shadowOpacity = 0.5; UIInterpolatingMotionEffect *verticalMotionEffect = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:mad:"layer.shadowOffset.height" type:UIInterpolatingMotionEffectTypeTiltAlongVerticalAxis]; verticalMotionEffect.minimumRelativeValue = @(20); verticalMotionEffect.maximumRelativeValue = @(-20);
UIInterpolatingMotionEffect *horizontalMotionEffect = [[UIInterpolatingMotionEffect alloc] initWithKeyPath:mad:"layer.shadowOffset.width" type:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis]; horizontalMotionEffect.minimumRelativeValue = @(20); horizontalMotionEffect.maximumRelativeValue = @(-20);
UIMotionEffectGroup *group = [UIMotionEffectGroup new]; group.motionEffects = @[horizontalMotionEffect, verticalMotionEffect];
[self.view addMotionEffect:group]; }
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.