1. What are the Application states. Explain them?
Answer :
Not running State: The app has not been launched or was running but was terminated by the system.if its background and crash.
Inactive state: The app is running in the foreground but is currently not receiving events. (It may be executing other code though.) An app usually stays in this state only briefly as it transitions to a different state. The only time it stays inactive for any period of time is when the user locks the screen or the system prompts the user to respond to some event, such as an incoming phone call or SMS message. Generally call VoIP support application.
Active state: The app is running in the foreground and is receiving events. This is the normal mode for foreground apps.User work on its.
Background state: The app is in the background and executing code. Most apps enter this state briefly on their way to being suspended. However, an app that requests extra execution time may remain in this state for a period of time. In addition, an app being launched directly into the background enters this state instead of the inactive state. For information about how to execute code while in the background, see “Background Execution and Multitasking.” Most of location based application.
Suspended state:The app is in the background but is not executing code. The system moves apps to this state automatically and does not notify them before doing so. While suspended, an app remains in memory but does not execute any code. When a low-memory condition occurs, the system may purge suspended apps without notice to make more space for the foreground app.like its receive push notification.
More
-----------------------------------------------------------------------------------------------------------
2. Difference between shallow copy and deep copy?
Answer :
Shallow copy is also known as address copy. In this process you only copy address not actual data while in deep copy you copy data.
-----------------------------------------------------------------------------------------------------------
3. Whats the difference between frame and bounds?
Answer :
The frame of a view is the rectangle, expressed as a location (x,y) and size (width,height) relative to the superview it is contained within. The bounds of a view is the rectangle, expressed as a location (x,y) and size (width,height) relative to its own coordinate system (0,0).
What is difference between NSNotification and delegate?
Delegate is passing message from one object to other object. It is like one to one communication while nsnotification is like passing message to multiple objects at the same time. All other objects that have subscribed to that notification or acting observers to that notification can or can’t respond to that event. Notifications are easier but you can get into trouble by using those like bad architecture. Delegates are more frequently used and are used with help of protocols.
56.What are KVO and KVC?
KVC: Normally instance variables are accessed through properties or accessors but KVC gives another way to access variables in form of strings. In this way your class acts like a dictionary and your property name for example “age” becomes key and value that property holds becomes value for that key. For example, you have employee class with name property.
KVO : The mechanism through which objects are notified when there is change in any of property is called KVO.
hope this will useful to you. If any new question please share with us....Thank you...:)
Answer :
Not running State: The app has not been launched or was running but was terminated by the system.if its background and crash.
Inactive state: The app is running in the foreground but is currently not receiving events. (It may be executing other code though.) An app usually stays in this state only briefly as it transitions to a different state. The only time it stays inactive for any period of time is when the user locks the screen or the system prompts the user to respond to some event, such as an incoming phone call or SMS message. Generally call VoIP support application.
Active state: The app is running in the foreground and is receiving events. This is the normal mode for foreground apps.User work on its.
Background state: The app is in the background and executing code. Most apps enter this state briefly on their way to being suspended. However, an app that requests extra execution time may remain in this state for a period of time. In addition, an app being launched directly into the background enters this state instead of the inactive state. For information about how to execute code while in the background, see “Background Execution and Multitasking.” Most of location based application.
Suspended state:The app is in the background but is not executing code. The system moves apps to this state automatically and does not notify them before doing so. While suspended, an app remains in memory but does not execute any code. When a low-memory condition occurs, the system may purge suspended apps without notice to make more space for the foreground app.like its receive push notification.
More
-----------------------------------------------------------------------------------------------------------
2. Difference between shallow copy and deep copy?
Answer :
Shallow copy is also known as address copy. In this process you only copy address not actual data while in deep copy you copy data.
-----------------------------------------------------------------------------------------------------------
3. Whats the difference between frame and bounds?
Answer :
The frame of a view is the rectangle, expressed as a location (x,y) and size (width,height) relative to the superview it is contained within. The bounds of a view is the rectangle, expressed as a location (x,y) and size (width,height) relative to its own coordinate system (0,0).
What is difference between NSNotification and delegate?
Delegate is passing message from one object to other object. It is like one to one communication while nsnotification is like passing message to multiple objects at the same time. All other objects that have subscribed to that notification or acting observers to that notification can or can’t respond to that event. Notifications are easier but you can get into trouble by using those like bad architecture. Delegates are more frequently used and are used with help of protocols.
56.What are KVO and KVC?
KVC: Normally instance variables are accessed through properties or accessors but KVC gives another way to access variables in form of strings. In this way your class acts like a dictionary and your property name for example “age” becomes key and value that property holds becomes value for that key. For example, you have employee class with name property.
KVO : The mechanism through which objects are notified when there is change in any of property is called KVO.
hope this will useful to you. If any new question please share with us....Thank you...:)