• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

AbhimanyuForiOS/GoogleNewsStandAnimation: It is same like Google News Stand Anim ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

AbhimanyuForiOS/GoogleNewsStandAnimation

开源软件地址(OpenSource Url):

https://github.com/AbhimanyuForiOS/GoogleNewsStandAnimation

开源编程语言(OpenSource Language):

Swift 100.0%

开源软件介绍(OpenSource Introduction):

GoogleNewsStandAnimation

It is same like Google News Stand Animation with Customise Configuration file in Swift iOS Technology.

This is the hot spot animation (with 4 swipe Gestures up,Down,Left,right) where user can see his/her information in only single page rather than making multiple views for showing data with Header card + Header card Detail .

Suppose you want to search a weather report of 4 cities A,B,C,D Respectively .

UP/DOWN Swip Gesture Use . 1.User can se A header + A header detail on the same view when he/she will swip the view Up & Down on same screen with animation.(no need to create extra views)

2.User can se B header + B header detail on the same view when he/she will swip the view Up & Down on same screen with animation.(no need to create extra views)

3.User can se C header + C header detail on the same view when he/she will swip the view Up & Down on same screen with animation.(no need to create extra views)

4.User can se D header + D header detail on the same view when he/she will swip the view Up & Down on same screen with animation.(no need to create extra views)

Left/Right Swip Gesture Use .

  1. When user will swipe left from A section he/she can see next neighbour B Section and it will done till end D Section respectively with Animation effect.

2.When user will swipe Right from D section he/she can see next neighbour C Section and it will done till end A Section respectively with Animation effect.

So by this approach here we gave only 4 views in a scroll container which is doing work of 8 table view listing with beautiful animation effect .

Step 1:- Go to your ViewController File and hide "Navigation Bar" for that "ViewController"

Step 2:- Register Delegate in front of your "ViewController":-

class ViewController: UIViewController,AnimatorCardDelegate,AnimatorTableDelegate {

}

Step 3:- Register Delegate Methods in to your ViewController:-

//MARK:- Animator Delegate Methods 
func didSelect(item: Model, inCard card: Card) {
    
    print(item.description)
    print(card.description)
    
    let vcDetail = DetailVc()
    vcDetail.titleString = card.strTitle;
    self.navigationController?.pushViewController(vcDetail, animated: true);
    
    
    
}

func cardClickedFromTopHeader(card: Card) {
    print(card.description);
    let vcDetail = DetailVc()
    vcDetail.titleString = card.strTitle;
     self.navigationController?.pushViewController(vcDetail, animated: true);
}

Step 4:- Finally Initialize your Animator in "viewDidLoad()" method of "ViewController":-

//1. initialize animator

    Animator.shared.setAnimator(UIImage.init(named: "bg.jpeg"), self.view)

    Animator.shared.delegateTable = self;
    
    Animator.shared.delegateCard = self;

//2. Or you can initialize animator with CARDS( you can configure your cards like this also):-

   Animator.shared.setAnimator(UIImage.init(named: "bg.jpeg"), self.view,AnimationConfig(cards: [Card.init(bgImage: "0.png", strTitle: "SCIENCE", items: [ Model() ] ) ]) );

Step 5:- 6 Cards are Limit of this NewsStand.

google_newsstand_like_navigation_pattern




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap