How to interview a 1-3-year-old IOS programmer (continuous update)

Source: Internet
Author: User

How to interview a 1-3-year-old IOS programmer (continuous update)

How to interview a 1-3-year-old IOS programmer (Continuous update) computer-based class
    1. Please tell me the difference between HTTP 1.0 and 1.1 (puzzle)
      This is a computer category of the problem, the specific difference can be a separate blog, but in general, the main difference is still referred to 1.1 in support of long connections. 1.0 Specifies that the browser can only keep a short connection with the server, the browser each request needs to establish a TCP connection with the server, the request is processed to immediately disconnect the TCP connection, the server does not track each customer also does not log past requests. Specifically, you can read this blog
    2. Please tell me the difference between long and short connections
      This was discussed with the interviewer, and he insisted on long connections and short connections. Not what is the HTTP long connection short connection, also is not the long connection short connection of the TCP, finally he says the difference is that the long connection will have a response during disconnection and connection. Differences, and here by the way the HTTP long connection short connection and TCP long connection short connection, address
    3. Please talk about the difference between TCP and UDP
      This is a relatively basic topic, feel that this problem is generally at most in the written test process, the answer is relatively simple, here does not occupy the layout.
    4. Some additional questions about TCP and UDP
      Transfer large files with which connection, security is which connection and so on, these problems are relatively simple, no longer one by one repeat
UI Foundation Questions
  1. The first one is the most common topic: say how you optimize tableView ...
    This question ... Perennial in the interview of various companies, written tests, online also has a 25 aspects to optimize the answer tableview, but the trap of this topic is, why optimize TableView? If it is a simple tableView, then follow the steps of the Apple development documentation to write, then there is no need to optimize. If it is a complex tableview, then the cache line is high, calculated in the ViewModel, or calculated in the Controller, and then passed to view before the view appears, instead of simply calling Estimaterowheight or Rowheightofcell These methods, or fdtemplatelayoutcell such as third-party calculations, and to avoid off-screen rendering, rasterized pictures of these simple low-level errors, then tableView do not need optimization.
  2. Talk about the reuse mechanism of TableView (written question)
    TableView's reuse mechanism solves the TableView memory problem very well, and TableView does not need to open a new space in memory every time a cell is created, Dequeuereusablecellwithidentifier: Method to create, this time, the system will go to a place called buffer pool to find the designated identifier (reuse identifier) cell, if not, it will directly return nil, and then based on Initwithstyle:reuseidentifier: Creates a cell, and when the cell leaves the interface, the memory extents that are occupied are stored in the cache pool for the next use. This is a split question.
  3. Say the life cycle of the controller (written question)
    • First determine if the controller has a view, if it is not called the Loadview method is created, either through storyboard or code
    • Call Viewdidload, which will only be called once, for the next initialization operation
    • Call Viewwillappear before the view is displayed, enter the view's life cycle, the function will be called before the view is displayed, so it may be called multiple times
    • After the view has finished displaying, call Viewdidappear
    • Call Viewwilldisappear before the view disappears, and again, if needed, the method is called multiple times
    • Call Viewwill/didlayoutsubviews to handle changes if the current layout needs to change
  4. Talk about the relationship between UIView and Calayer (more difficult in the written question)
    UIView can display on the screen actually mainly or calayer credit, by calling the DrawRect method to render their own content, the condition Calayer property can adjust the UIView appearance, UIView inherit from Uiresponder, can respond to the user This is something that Calayer can't do.
    All the interfaces in the IOS system show that the elements of the interface are based on UIView, while the interior of the UIView is managed by Calayer (Core Animation Layer) classes. UIView itself, more like a Calayer manager, Calayer responsible to achieve the effect, and UIView is responsible for the effect of the show.
    Here is only a bit of shallow knowledge, other such as can be through the UIView layer property to obtain the corresponding Calayer instance, through the Layerclass method to obtain the corresponding main layer of the class used, and UIView subclass, can be Overr IDE this way, to let Uview use different calayer to display
    There are also calayer, such as the tree structure of the UIView, and so on, too deep, is not generally the main focus of the interview.
  5. Talk about Loadview? (Written questions)
    Loadview is used to customize the view, as long as this method is implemented, other view created by Xib or SB will not be loaded. Combines the description of the Loadview method in the previous controller declaration cycle.
  6. Say how high-performance to Uiimageview fillet (written test, Bad street problem)
    It is generally stated that you should not use the Cornerradius property.
    Two methods: One is the simplest way, please the UI to eat a meal, ask him/her to help you cut a background color of the same color of the square inside the hollow circle of the picture can be; Another kind of trouble, if the relationship with the UI is not good, write a classification of what, in the picture, the picture to redraw it. is to draw such a mask directly above the picture.
  7. Talk about the effects of using DrawRect
    In actual work we will often use this method to do a lot of things, including the above redraw, as well as drawing graphics, I used this to draw charts, and even animated, methods rely on the Core Graphics framework for custom drawing, although this method is very useful, But there are drawbacks to this approach: it's not so friendly to touch events. Each time a touch event is processed, such as when a button is clicked, it needs to be called once Setneeddisplay this method to force redraw. And this redraw operation is more than once! Each click is triggered two times. So, if the current page uses a secondary drawrect to draw, and the drawing of these buttons, and other things, if it will trigger a lot of touch events, then the CPU and memory is very unfriendly.
    In addition to the Setneeddisplay method, when this method is called, UIKit will mark the current layer as dirty, but will still temporarily display the original content, know the next time the view render cycle, will be labeled as dirty layer re-establish COR The e Graphics context, then restores the in-memory data and draws it using CGCONTEXTREF.

How to interview a 1-3-year-old IOS programmer (continuous update)

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.