Proyek
Lihat di GitHub
nathanwhy/HYAwesomeTransition
Tentang
Custom transition between viewcontrollers
Desain dan mediaPertumbuhan bintang terukur
- dalam 24 jam
- 0
- dalam 7 hari
- 0
- dalam 15 hari
- 0
- dalam 1 bulan
- Mengumpulkan riwayat
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
AsliHYAwesomeTransition
Custom transition between viewcontrollers.
The idea comes from gewara(格瓦拉).
Programming in Swift? Switch to Swift branch

Requirements
iOS 7.0 +
Example
self.awesometransition = [[HYAwesomeTransition alloc] init];
self.awesometransition.duration = 2.0f;
self.awesometransition.containerBackgroundView = customView;
[self.awesometransition registerStartFrame:startFrame
finalFrame:finalFrame
transitionView:cell];
[self presentViewController:vc animated:YES completion:^{
vc.avatar.hidden = NO;
}];
Implement UIViewControllerTransitioningDelegate and this delegate method:
- (id <UIViewControllerAnimatedTransitioning>)animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source
{
self.awesometransition.present = YES;
return self.awesometransition;
}
- (id<UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:(UIViewController *)dismissed
{
self.awesometransition.present = NO;
return self.awesometransition;
}
If you use UINavigationController,you have to implement UINavigationControllerDelegate instead of UIViewControllerTransitioningDelegate, but interactive gesture is not suppored yet.
- (id <UIViewControllerAnimatedTransitioning>)navigationController:(UINavigationController *)navigationController
animationControllerForOperation:(UINavigationControllerOperation)operation
fromViewController:(UIViewController *)fromVC
toViewController:(UIViewController *)toVC{
if (operation != UINavigationControllerOperationPush) {
self.awesometransition.present = NO;
}else{
self.awesometransition.present = YES;
}
return self.awesometransition;
}
License
HYAwesomeTransition is available under the MIT license. See the LICENSE file for more info.
Jelajahi proyek terkait
Memuat…