iOS Basic Quiz Interview

Source: Internet
Author: User
Tags xml attribute

Tag: Generate PCH BSP dynamic display cat mode return program load

< Jane Book Community-timhbw>ios basic Questions Series (i)-with answer: http://www.jianshu.com/p/1ebf7333808d
< Jane Book Community-timhbw>ios basic Questions Series (ii)-attached answer: http://www.jianshu.com/p/ce50261f8907
< Jane Book Community-timhbw>ios Basic Questions Series (iii)-attached answer: http://www.jianshu.com/p/5fd65c20912e

    • Here are some of the more basic questions you collect (the big God can ignore), with an answer that's easy for everyone to read. As the saying goes, the foundation is not good, shake. At the end of the article will provide a PDF version of the document, so that everyone can use the network when the mobile device to watch.

The difference between 1.XCODE5 and Xcode7?
    • Xcode7 does not have a frameworks folder, Xcode7 internally will automatically help you import some common frameworks.

    • Xcode7 Launchscreen.xib,launchscreen.xib Set the Start screen, and can determine the actual size of the simulator or real machine, if not set, the default size of 4s (320,480)

    • Xcode7 no PCH file

    • XCODE5 also has info.plist, but its name is very long. is the name of the project.

How does the 2.pch file work?
    • Import all the contents of the PCH into each file

3.UIApplication Common features?
    • Set app reminder numbers

    • Setting up a network status

    • Set the status bar

    • Jump page

4. Program Complete START process?
    • 1. Execute Main

    • 2. Execute the Uiapplicationmain function.

    • 3. Create the UIApplication object and set the proxy for the Uiapplicationmain object. The third parameter of the uiapplication is the name of the uiapplication, and if you specify nil, It defaults to Uiapplication.uiapplication's fourth argument as UIApplication's proxy.

    • 4. Turn on a main run cycle. Ensure that the application does not exit.

    • 5. Load info.plist. Load the configuration file. Determine if there is a info.plist file in the main storyboard files base name, there is no designated storyboard file, if there is to load Info.plist file, If not, then the application has finished loading.

What is 5.UIWindow?
    • UIWindow is a special kind of uiview that usually has at least one UIWindow in an app.

    • After the iOS program starts, the first view control created is UIWindow, and then the controller's view is created,

    • Finally, the controller's view is added to the UIWindow, so the controller's view is displayed on the screen.

    • An iOS program can be displayed on the screen entirely because it has UIWindow

6. Steps to create a window manually?
    • 1. Create a window, to have a window display, you must have a strong reference. The window is also a control that you want to show. Must have dimensions.

    • 2. Create a Controller

    • 3. Setting the controller as the root controller for Windows

    • 4. Display window

What did 7.makeKeyAndVisible do?
    • Make the window appear as a display state.

    • Add the view of the root controller to the window.

    • Set the current window as the main window of the application

8. How do I load the controller from the storyboard?
    • Loads the specified storyboard

    • The controller that the load arrow points to.

    • Loads the controller for the specified identity.

9.initWithNibName loading process?
    • If no name is specified. Nil, then it will load the xib with the same name.

    • If there is no xib with the same name, then it will be loaded with the same name to go to the name of the controller xib.--Controllers of the Init method will call Initwithnibname: method.

10.LoadView function and the attention point of using Loadview?
    • The controller calls the Loadview method to create a view of the Controller. Its default practice is:

    • First to determine whether the current controller is loaded from the storyboard, if so, then it will load the controller from the storyboard view.

    • If it is not loaded from the storyboard, it will also determine whether it is a controller created from the xib. If so, it will load the controller's view from the Xib.

    • If it is not a controller that is loaded from xib. Then it creates an empty uiview. View that is set as the current controller.

      • Once the Loadview is rewritten, it means that you need to create a view of the controller yourself.

      • If the controller's view has not been assigned, you cannot call the controller view's Get method. It will cause a cycle of death.
        The Loadview method is called because of the bottom of the Get method of the controller view.

      • Note the point:

What is a 11.UIPickView control, and what is the basic usage?
    • Uipickview Select the control to be used by the user to select some cities. Its basic usage is similar to TableView, to set up a data source, proxy, and show the data

12.KVC bottom-level implementation?
    • Matches a string with the properties of the current class. If it matches, assign a value to the property.

[flagItem setValue:obj forKeyPath:key];
    • 1. A set method is found with the same name as the key value, if any, the set method is called and the obj is passed in

    • 2. If there is no set method. Then it's going to find a member property that has an underscore without the same name, and assigns a value to the property if there is one.

    • 3. If there is no member property with an underscore, look for a member property with the same name as it, and assign a value to the property if there is one.

    • 4. If you do not have a member property with the same name as it, you will be calledsetValue:(id)value forUndefinedKey:

    • 5. If Setvalue:forundefinedkey is not implemented: direct error

13. What is the structure of the navigation controller view?
    • A view that specializes in stack top controller view

    • A navigation bar, the height of the navigation bar is 44,y value of 20

14. What does navigation push do?
    • When the push method is called, the controller to be pushed is added to the management stack of the navigation controller, the top controller view of the previous navigation controller is removed, and the current stack top controller is added.

15. What do I do to navigate pops?
    • When the Pop method is called, the controller to pop is removed from the stack, the top controller view of the previous navigation controller is removed, and the current stack top controller is added.

16. How do I set the contents of a navigation bar?
    • The contents of the navigation bar are determined by the navigationitem of the navigation controller's stack top controller.

17. What are the navigation controller pop operations?
    • Back to previous level

    • Return to the root controller

    • Returns to the specified controller.

18. How does the text box intercept user input?
    • Sets the proxy for the specified file box, and implements the proxy method. Includes whether to allow editing, whether to allow the end of the edit, whether to allow the change of characters, and so on.

19. How do I customize the keyboard?
    • To customize the keyboard, to inherit the system's Uitextfield, set a property of the text box, the property name is Inputview. This allows you to define your keyboard as the view you want.

20. What is the role of the navigation controller?
    • The navigation controller can easily switch between controllers. Its operation has push,pop and so on.

21. What is the difference between auto-jump and manual jump?
    • Auto Jump: Jump by dragging a line directly from a control

    • Manual jump: Before jumping to do some processing work. Must be executed in performSegueWithIdentifier: order to jump.

22. When to use the agent, agent steps?
    • When something happens to an object, you want to pass it on to someone else. Or tell someone to do something. Use a proxy.

    • Usage scenario: between the upper and the inferior, usually it becomes its agent on the top level.

    • Steps:

      • 1. Defining the Agreement

      • 2. Defining Proxy Properties

      • 3. Calling proxy methods in. m files

      • 4. Setting up the agent

      • 5. Compliance with agreements

      • 6. Implementing the Protocol Approach

What are the storage methods in 23.ios?
    • XML attribute list (plist)

    • Preference (preference setting)

    • Nskeyedarchiver, only objects that comply with the Nscoding protocol can use this method.

    • Sqlite

    • Core Data

24.tableView Performance Optimization
    • 1.tableView caching mechanism.

    • 2. In the unequal cell, calculate the row height of the cell ahead of time. Estimate a row height in advance. 200-250

    • 3. If there is a round picture in the cell, do not use the ImageView to load the Layer.corneadius clip. will cause off-screen rendering. Crop qurarzds with a drawing to create a rounded picture.

    • 4. If the width of the picture is high, it is specified as a decimal. It can cause aliasing, which can cause off-screen rendering

    • The size of the ImageView in the 5.cell is best as large as uiimage, and if it is not the same, it will deform the uiimage. The cell shows a small map. The size of the small map and the ImageView click to enlarge, is to load larger images with large imageview.

    • 6. Be sure to use the real machine when doing tableview.

    • 7. If you are loading data from a network, be sure to do so in a sub-thread (asynchronous loading).

    • 8. The loaded data must be cached locally.

    • Do not add child controls dynamically in 9.cell. Usually when created, the cell to appear to add, temporarily do not display, can be hidden.

    • 10. Minimize the number of child controls inside the cell.

    • 11. If the control is very numerous, control that does not need to interact with the user. Can be drawn asynchronously. Create a picture. Add a picture to the cell

PDF2 File Download: http://dl.huangbowei.com

Original link: http://www.jianshu.com/p/ce50261f8907

iOS Basic Quiz Interview

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.