Practice Question and Answer
8Q: How can your application perform actions that are provided by other application e.g. sending email? 981 05b5cc7d6e4d2b419777514fe
5b5cc7d6e4d2b419777514fe- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer :
Explanation :
Intents are created to define an action that we want to perform and the launches the appropriate activity from another application. Code ┬а ┬а ┬а ┬а Intent intent = new Intent(Intent.ACTION_SEND); ┬а ┬а ┬а ┬а intent.putExtra(Intent.EXTRA_EMAIL, recipientArray); ┬а ┬а ┬а ┬а startActivity(intent);
Q: How will you launch an Activity within you application? 1631 05b5cc7d6e4d2b419777514fd
5b5cc7d6e4d2b419777514fd- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer :
Explanation :
For launching an application, we will need to create an intent that explicitly defines the activity that we wish to start. For example: Code ┬а ┬а ┬а ┬а Intent intent = new Intent(this, MyTestActivity.class); ┬а ┬а ┬а ┬а startActivity(intent);
- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer :
Explanation :
A struct is a special C data type that encapsulates other pieces of data into a single cohesive unit. Like an object, but built into C.
Q: Whats the difference between a NSArray and a NSMutableArray? 1147 05b5cc7d6e4d2b419777514fb
5b5cc7d6e4d2b419777514fb- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer :
Explanation :
A NSArrayтАЩs contents can not be modified once itтАЩs been created whereas a NSMutableArray can be modified as needed, i.e items can be added/removed from it.
Q: If I call performSelector:withObject:afterDelay: тАУ is the object retained? 1009 05b5cc7d6e4d2b419777514fa
5b5cc7d6e4d2b419777514fa- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer :
Explanation :
Yes the object is retained. It creates a timer that calls a selector on the current threads run loop. It may not be 100% precise time-wise as it attempts to dequeue the message from the run loop and perform the selector.
Q: Explain the correct way to manage Outlets memory? 1045 05b5cc7d6e4d2b419777514f9
5b5cc7d6e4d2b419777514f9- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer :
Explanation :
Create them as properties in the header that are retained. In the viewDidUnload set the outlets to nil(i.e self.outlet = nil). Finally in dealloc make sure to release the outlet.
Q: Where can you test Apple iPhone apps if you donтАЩt have the device? 1772 05b5cc7d6e4d2b419777514f8
5b5cc7d6e4d2b419777514f8- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer :
Explanation :
iOS Simulator can be used to test mobile applications. Xcode tool that comes along with iOS SDK includes Xcode IDE as well as the iOS Simulator. Xcode also includes all required tools and frameworks for building iOS apps. ┬аHowever, it is strongly recommended to test the app on the real device before publishing it.
Q: Which API is used to write test scripts that help in exercising the application's user interface elements? 1490 05b5cc7d6e4d2b419777514f7
5b5cc7d6e4d2b419777514f7- Show AnswerHide Answer
- Workspace
- SingleChoice
Answer :
Explanation :
UI Automation API is used to automate test procedures. Tests scripts are written in JavaScript to the UI Automation API. ┬аThis in turn simulates user interaction with the application and returns log information to the host computer.

