Interview Questions iPhone

iPhone


51. MVC Architecture of iPhone App?
MVC Architecture of iPhone App. Here are the reasons why we should use the MVC (Model View Controller)design pattern.
1.They are resuable : When the problems occurs, there is no need to invent a new solution, we just have to follow the pattern and adopt it as necessary.
2.They are expressive: By using the MVC design pattern our application becomes more expressive.
3).Model: The model object knows about all the data that need to be displayed. It is model who is aware about all the operations that can be applied to transform that object. It only represents the data of an application. The model represents enterprise data and the business rules that govern access to and updates of this data. Model is not aware about the presentation data and how that data will be displayed to the browser.
4).View: The view represents the presentation of the application. The view object refers to the model.It uses the query methods of the model to obtain the contents and renders it. The view is not dependent on the application logic.It remains same if there is any modification in the business logic.In other words, we can say that it is the responsibility of the of the view's to maintain the consistency in its presentation when the model changes.
5).Controller: Whenever the user sends a request for something then it always go through the controller. The controller is responsible for intercepting the requests from view and passes it to the model for the appropriate action. After the action has been taken on the data, the controller is responsible for directing the appropriate view to the user. In GUIs, the views and the controllers often work very closely together.

52. What is meant by iPhone reference library?
The iPhone reference library is a set of reference documents for iPhone OS. It can be downloaded by subscribing to the iPhone OS Library doc set. Click the subscribe button next to the iPhone OS Library doc set, which appears in the left column.

53. What are sensors in iPhone?
The proximity sensor immediately turn offs the display when the iPhone is lifted to ear. With the help of this sensor, the power is saved and accidental dialing is prevented. The display automatically brightens the iPhone by the ambient light sensor when the sunlight or bright rooms and dims in darker places

54. Why an app on iOS device behaves differently when running in foreground than in background?
An application behaves differently when running in foreground than in background because of the limitation of resources on iOS devices.