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

Advanced Sports Nutrition Baidu Cloud Download

Course Catalog ├──Diet for weight loss | ├──Nutri...

Kuaishou Blue V Operation Guide!

In 2021, Xiaohongshu is undergoing major changes,...

Practical example of setting up a bidding OCPC account

Many friends have not tried ocpc yet. In fact, oc...

8 key points for Weibo operations!

I haven't been here for a long time. How are ...

How to play the short video planting game?

In fact, in today's world where content homog...

APP operation: How to operate the four life cycles of a product

Having been engaged in operations for so long, I ...

Does 400 number call cost money? Do I need to pay for 400 calls?

Many people think that 400 calls are free, and no...

Black takeaway tableware is the dirtiest? Judging by color alone is unreliable!

gossip “Black plastic cutlery is the dirtiest” Th...