您的位置:首页 > 产品设计 > UI/UE

iOS Interview Questions with Answers part2

2014-07-29 11:45 495 查看

原帖地址:http://huntmyideas.weebly.com/blog/ios-interview-questions-with-answers-part2

iOS
Interview Questions with Answers part2

06/09/2014

0 Comments

 



1.NSBundle Main bundle?
Answer:-

It is used to pick the data from resources.
2.What is UI application?
Answer:-

Every iPhone has UI application.it is the starting point of the every application.It is responsible for initializing and display your application on UI Window and also responsible for loading your application.

3.What is Controllers in iPhone?
Answer:-

By using controllers we can move from one view to another view.

ex:PushViewController, popViewController, PresentModalViewController,DismissModelViewController.

3.How can we Localize our app?

Answer:-


Localization have to use current language

For example: to make a delete button

in English: Delete

in Japanish lan: Aurem

in spanish: Delat

in this way we can localize our app

4.why we use Authentication?

Answer:-

For the security purpose we use authentication

5.When keyboard appears, hides some part of UI for that what shall we do?

Answer:-

Key board will appear only in some views like "Textfield","Textviews" etc.

but not in all the views.

For display the keyboard we have to use "becomeFirstResponder"..

For display the keyboard we have to use "resignFirstResponder"

example:

[textField becomeFirstResponder];

[textField resignFirstResponder];

6.What is awakeFromNib, becomeFirstResponder?

Answer:-

Activity should be allocated from loading xib file, it should be not nil in awakFromNib

And awakeFromNib is called when all file owners outlets and properties are set (including view property).

So it makes sense that viewDidLoad is called earlier than awakeFromNib.

7.becomeFirstResponder?

Answer:-


For display the keyboard we have to use "becomeFirstResponder"..

Example:[textField becomeFirstResponder];

8.what happens when we invoke a method on a nil pointer?

Answer:-

It returns 0, nil, a structure filled with 0s,

Multiple class inheritance in objective c?

In Objective c Multiple inheritance is not supported

For this purpose we use "categories" in Objective c

9. What is Categories?

Answer:-

A category allows you to add methods to an existing class

Categories are a powerful feature that allows you to extend the functionality of existing classes .

10.What is subclassing?

Answer:-

The declaration of a category interface looks very much like a class interface declaration.

Except the category name is listed within parentheses after the class name and the superclass isn’t mentioned .

Class extensions are like anonymous categories,except that the methods they declare must be implemented in the main @implementation block for the corresponding class.

11.What is extensions ?

Answer:-

it 
allow you to declare additional required methods for a class

in locations other than within the primary class @interface block,

12.What is Picker view..?

Answer:-

Picker view lets the user select an item from a list.

13.What is Table view?

Answer:-

It is commonly used to show list of data in the form of Records

14.What is Web Services?

Answer:-

Web services are application programming interfaces [API]

or Web API's that are accessed via Hyper Text protocol and excited on a remote system hosting the requested services.

15. What are the Design Patterns?

Answer:-

Design Patterns :

MVC

Singleton :

A system only needs to create one instance of a class, and that instance will be accessed throughout the program. Examples would include objects needed for logging, communication, database access, etc. You could pass such an instance from method to method,
or assign it to each object in the system. However, this adds a lot of unnecessary complexity.

Factory design pattern :

The factory method pattern is an object-oriented design
pattern to implement the concept of factories. Factory method Pattern is to "Define an interface for
creating an object, but let the subclasses decide which class to instantiate.

16. Class method begins with?

Answer:-

@interface

Methods define

@implementation

Define methods are implemented.

17. Default constructor syntax is?

Answer:-

- (id) init.

18.Which API’s are using in u r application?

Answer:-


API means frameworks like UIKit, foundation, Core animation.

19. What is the cocoa?

Answer:-


Object c framework called COCOA. The specific part of the framework used for iPhone app development is called Cocoa Touch.

20 .What is the difference Between APPKit and UIKit?

Answer:-

There is NO APPKit in iPhone and there is no UIKit in Mac OS

21.How to customize your app in iPhone?

Answer:-

WinterBoard 
is an application that let you customize your iPhone / iPod 2.0+.

22. What is the WinterBoard?

Answer:-

WinterBoard allows you to customize Springboard of your iPhone. Using WinterBoard you can change iPhone icons, customize applications, status bar graphics, iPhone dock graphics, install themes and change wallpapers of your iPhone Springboard. You can even customize
sounds on your iPhone. With WinterBoard you can theme almost everything that comes to your mind. Before iPhone 2.0 there was SummerBoard but WinterBoard has replaced it since iPhone 2.0 and can even load themes of SummerBoard.

23. What is the springboard?

Answer:-

Springboard 
is the standard application that manages the iOS (formerly iPhone OS) home screen.

24. Is it support multiple inheritance? How it’s over come?

Answer:-

Not supported

25. What is the memory management?

Answer:-

It allocates and reallocates memory and find out memory leaks.

26. What is the Singletons?

Answer:

Singletons are a class that only gets instantiated once in your application’s run-time.

Example: web based Resource manager class.

27. How many layers are there in iphone sdk?

Answer:-

(i).cocoa touch layer

(ii)Address book UI

(iii)UIKit

(iv)media layer

(v)audio toolbox

(vi)audio Unit

(vii)AV foundation

(viii)core Audio

(ix)core graphics

(x)media player

(xi)open GL ES

(xii)quartz Core

(xiii)core service layer

(xiv)address book

(xv)core foundation

(xvi)core location

(xvii)foundation

(xviii)system Configuration

(xix)core os layer

(xx)CF network

(xxi)security

(xxii)system

28. How to handle device orientation?

Answer:-

ShouldAutoRotateTointerfaceorientation – method

29. Deployment steps?

Answer:-


Deployment:

(1)Open Applications
- Utilities - Keychain access –certificate assistance – requested a certificate from  a certificate authority

Email :

Save to disk (radio button) Ok

Certificate icon Is created in desktop. (developer certificate is created)

(2)Upload the developer certificate into developer.apple.com

Registered login :

(3)Create the provisioning profile from developer.apple.com and download it to system.

(4)Open the Xcode and select the window -> organizer -> select the device and under provisioning profile tab drag it to device.

30. What is Framework?

Answer:-


Frame work is a library.It contains all collection of predefined classes,functions,protocols....

31.What is Protocol?

Answer:-

A protocol is a collection of methods that any class can choose to implement. This can be useful when you are creating family of similar classes that all need to communicate with a common control class.

32.What is Category?

Answer:-

A category is a way of adding new methods to the all instances of existing class with out modifying the class.The use of category is extending the NSString class to add functionality.

33.What is Property?

Answer:-


By using property what ever the data are stored in array,string,… that values are used in any where in that program.Property contains the data and synthesize retrieve the data.

34.What is Selector?

Answer:-

Selector can either be a name of method Or message to an object.

By using selector we can convert upper case string into lower case string.

34.What is Garbage collection?

Answer:-

Garbage collection means a memory management system that automatically release memory used by unreferenced variable.

35.What is Getter method?

Answer:-

Getter method is an accessor method that retrieves the value of an instance variable.

36.What is Setter method?

Answer:-

Setter method is an accessor method that Sets the value of an instance variable.

37.What is Delegate?

Answer:-

An object directly to carryout an action by another object.

38. What is iPhone Paths?

Answer:-

iPhone contains two paths.

(1).Resource path:By using this path we can retrieve the data from resource path.But we can not add the data.

(2)By using this path we can add,modify,delete,retrieve the data.

39.What is Interface Builder?

Answer:-

Interface builder is developed in 1988.It is a visual tool that allows you to design your interfaces for iPhone.By using interface builder we can drag and drop the views on interface.

40.What is Accelerometer?

Answer:-

The accelerometer allows the device to detect the orientation of the device and adapts the content to suit the new orientation.

41.What is Instruments?

Answer:-

The instrument enables you to dynamically trace and profile the performance of the Mac os,iPhone, iPad applications.By using Instruments we can test the performance of the application.

42.What is Header file?

Answer:-

By using #include,#import we can import the header files.These two are preprocessor directories.

43.Diff between self and super?

Answer:-

Self:self is a variable that refers to the object of present class.

Super:Super refers to the same variable.

44. What is Inspector?

Answer:-

It is mainly used for setting the properties of view elements. It contains four sections.

1) Attribute inspector 

2) Connection

3) Size of inspector 

4) Identity

45.What is Resources?

Answer:-


In resources we can add the outside contents like images,videos,audio files.

It contains info.plist file.plist file having entire project information.

46.What is Files owner window?

Answer:-

It contains copy of nib files.

It is always 1st icon in any .nib file.

47.What is Foundation framework?

Answer:-

It provides foundation classes for objective-c. such as NSObject,basic data types.

48.What is UIKit framework?

Answer:-

It provides fundamental objects for managing the UI applications.

49.What is core location framework?

Answer:-

It provides location based information using combination of GPS,cell ID,hi-fi networks.

50.MapKit framework?

Answer:-

It provides an Embedded map interface for your application.

- See more at: http://huntmyideas.weebly.com/blog/ios-interview-questions-with-answers-part2#sthash.8ciOICqc.dpuf
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: