Article handling source: blog.csdn.net/Calvin_zhou…

Author: PGzxc (If there is infringement, contact the author, immediately delete)

For those interested in iOS development, check out the author’s iOS chat group:812157648In the group, you can blow water and exchange relevant knowledge. There are also some materials about the interview that I have sorted out. Welcome to join the group and drive together

An overview of

This paper builds QQ mainstream framework program, including the following functions:

  • There are four buttons at the bottom: Message, Contact, Dynamic, and Settings. You can switch the corresponding interface by using the buttons
  • Each interface has a layout and buttons
    • Contact interface: UISegmentedControl Switch and Add Contact buttons jump to the contact adding interface
    • Dynamic, set page: grouping

Main.storyboard

2.1 Interface drag-and-drop Layout

  • Remove old layout (automatically generated by Xcode)
  • Add a TabBarController as the main interface
  • Add 4 Navigation Controllers (Message, Contact, dynamic, Settings) in sequence

2.2 the attachment

  • Right click on the TabBarController to view Controllers and connect them to the message, contact, dynamic, and Settings Navigation Controllers

2.3 Setting text and picture on Navigation Controller

  • Click on the Message (Navigation Controller) and set the question and picture to display on the right
  • Similarly, set the other three Navigation controllers

3 Interface Details

3.1 the message

  • Click on Navigation Item and set Title to message
  • Add a Bar Button Item and modify the image displayed

3.2 the contact

3.2.1 Interface Modification

  • Add Segmented Control and set Segments to 2; Segments-0 indicates group, and Segments-1 indicates all
  • Add a Bar Button Item and modify the icon to add a contact

3.2.2 Segmented event

  • New ContactTableViewController and associated contact controller

  • Adding Segmented ContactTableViewController event method

    - (IBAction)valueChange:(UISegmentedControl *)sender
    {
        NSLog(@"%d",sender.selectedSegmentIndex);
    }
    
    Copy the code

3.2.3 Adding contacts Jumps

  • Click Add contact Bar Button Item and show to associate with add contact interface

3.3 Dynamic And Group Settings

  • Click TabView, Content drop down and select Static Cells
  • Style drop-down chose zhai
  • Click on the Grouped cells, select Basic Style drop-down, Disclosure Indicator(right arrow), and set the words and pictures to display
  • Set other groups in the same way

Four renderings