High imitation Baidu Nuomi

High imitation Baidu Nuomi

Source code introduction: High imitation of Baidu Nuomi iOS, version number: 5.13.0; High imitation of Baidu Nuomi iOS adopts the method of creating the interface mainly by storyboard, which is different from the official pure code + a small amount of xib method. The latest code can refer to my GitHub link: https://github.com/lookingstars/nuomi If you think it is good, welcome to star. The gif image is more than 1M in size, and the current website cannot upload it. There is a gif image under the GitHub link.

Source code effect:

Source code snippet:

  1. - ( void )initTabBarItem {
  2. UITabBar *tabbar = self.tabBar;
  3. // self.tabBarController.tabBar;  
  4. UITabBarItem *item0 = [tabbar.items objectAtIndex: 0 ];
  5. UITabBarItem *item1 = [tabbar.items objectAtIndex: 1 ];
  6. UITabBarItem *item2 = [tabbar.items objectAtIndex: 2 ];
  7. UITabBarItem *item3 = [tabbar.items objectAtIndex: 3 ];
  8. UITabBarItem *item4 = [tabbar.items objectAtIndex: 4 ];
  9.       
  10. item0.selectedImage = [[UIImage imageNamed:@ "icon_tab_shouye_highlight" ] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
  11. item0.image = [[UIImage imageNamed:@ "icon_tab_shouye_normal" ] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
  12. item1.selectedImage = [[UIImage imageNamed:@ "icon_tab_fujin_highlight" ] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
  13. item1.image = [[UIImage imageNamed:@ "icon_tab_fujin_normal" ] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
  14.       
  15. item2.selectedImage = [[UIImage imageNamed:@ "tabbar_voice_icon" ] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
  16. item2.image = [[UIImage imageNamed:@ "tabbar_voice_icon" ] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
  17. item2.imageInsets = UIEdgeInsetsMake( 6 , 0 , - 6 , 0 ); //Note the two values ​​here  
  18.       
  19. item3.selectedImage = [[UIImage imageNamed:@ "tab_icon_selection_highlight" ] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
  20. item3.image = [[UIImage imageNamed:@ "tab_icon_selection_normal" ] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
  21. item4.selectedImage = [[UIImage imageNamed:@ "icon_tab_wode_highlight" ] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
  22. item4.image = [[UIImage imageNamed:@ "icon_tab_wode_normal" ] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
  23. //Change the font color of UITabBarItem  
  24. [[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:navigationBarColor,UITextAttributeTextColor, nil] forState:UIControlStateSelected];
  25. }

Download address: http://download..com/data/2111750

<<:  Scan QR code barcode

>>:  Naughty Tom Cat

Recommend

How long would it take to dig through the Earth?

There is a saying that goes "go to the sky a...

Flower arrangement training advertising case!

As a way of life for people to cultivate their ch...

What is it like to drive a new energy vehicle?

Recently, a friend of mine wants to buy a car. I&...

Master the core rules of Tik Tok and create explosive short videos!

What exactly is the structure of a short video? H...

4 cases of Super Fans Pass, let the data speak for themselves!

We have previously introduced the new features of...

Jump? Still jumping? If you jump again, you will... go to hell!

Speaking of dung beetles, everyone may be familia...

The world's largest SD card costs less than 300 yuan

SanDisk recently released the world's largest ...

These 16 classic ads changed the way marketers think

Some ads were very successful, such as Benetton&#...