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

Google promotion: teach you how to do Google search advertising

Google Ads is the most important form of advertis...

Popular Science | How to choose socks? Beware of carcinogens!

According to a report by CCTV Finance Channel on ...

NVIDIA Titan Z first test: The dual-core king of cards is terrible

NVIDIA's dual-core GeForce GTX Titan Z has bee...

TLAttributedLabel Image and text mashup

Source code introduction: TLAttributedLabel image...

What should I do if the price of Google UAC advertising suddenly increases?

When placing Google UAC ads , especially UAC1.0, ...

Life Encyclopedia丨Do you store tea leaves at home correctly?

Tea is available in almost every household. As a ...

Imitation mall app

Source code introduction: 1. It has the function ...

【World Oceans Day】Modern marine aquaculture model - mobile "deep sea granary"

【World Oceans Day】Modern marine aquaculture model...

How far does Greater Beijing have to go to become a “zero-waste city”?

The accumulated stockpile of various types of sol...