ios面试问题_iOS面试问答

ios面试问题

Here are 40+ commonly asked IOS interview questions and answers which will definitely help you out in interviews.

这里有40多个IOS面试常见问题和答案,它们肯定会在面试中为您提供帮助。

1. Enlist the Latest IOS Development Patform?

1.申请最新的IOS开发模式吗?

The recent iOS Development platforms are as follows: iOS 9.2 beta 2 Build version: 13C5060d IOS 9.1 Build Version: 13B143

最新的iOS开发平台如下: iOS 9.2 beta 2构建版本:13C5060d IOS 9.1构建版本:13B143

2. Explain Fast Enumeration.

2.解释快速枚举。

Fast enumeration is a iOS Programming Language feature that enables you to enumerate over the contents of a collection. It will also make your code execute your code faster due to internal implementation which gets reduced message sending overheads and increased pipelining potential.

快速枚举是一种iOS编程语言功能,可让您枚举集合的内容。 由于内部实现,这还将使您的代码更快地执行代码,从而减少了消息发送开销并增加了流水线潜力。

3. Explain ARC.

3.解释ARC。

ARC represents Automatic Reference Counting. It is a Compiler level feature that simplifies the process of managing the lifetimes of Objects in Objective – C. ARC evaluates the Lifetime requirements of Objects and automatically includes appropriate Methods to be called during Compilation.

ARC代表自动参考计数。 它是编译器级别的功能,可简化在Objective-C中管理对象生存期的过程。ARC评估对象的生存期要求,并自动包括在编译过程中要调用的适当方法。

IOS Interview Questions and Answers

Image Source

图片来源

4. Explain Mutable and Immutable Types in Objective C Programming Language.

4.用Objective C编程语言解释可变和不可变类型。

Mutable Types means you can modify the Contents later when you feel the need. However, when an Object is marked as Immutable, it implies that the data cannot be modified later after it has been initialized. Therefore, the stored values are Constant here.

可变类型意味着您可以在以后需要时修改目录。 但是,当将一个对象标记为“不可变”时,则意味着该数据在初始化之后就无法再修改。 因此,此处存储的值是常量。

Example: NSString, NSArray values cannot be altered after initialization.

示例: NSString,NSArray值在初始化后不能更改。

5. What is Garbage Collection?

5.什么是垃圾回收?

Garbage Collection is a Memory Management feature. It manages the allocation and release of the memory to your applications. When the garbage collector performs a collection, it checks for objects in the managed heap that are not executed by the applications.

垃圾回收是一项内存管理功能。 它管理对应用程序的内存分配和释放。 垃圾收集器执行收集时,将检查托管堆中未由应用程序执行的对象。

6. Explain xib.

6.解释xib。

.xib is a file extension that is associated with Interface Builder files. It is a graphics software that is used to test, develop and design the User Interfaces of different software products. Such extension files also contains development time format files that includes interface files created with the interface builder softwares.

.xib是与Interface Builder文件相关联的文件扩展名。 它是一种图形软件,用于测试,开发和设计不同软件产品的用户界面。 此类扩展文件还包含开发时间格式文件,其中包括使用界面构建器软件创建的界面文件。

7. Which Programming Languages are used for iOS Development?

7. iOS开发使用哪种编程语言?

The languages used for iOS development are as follows: 1. Objective-C 2. .NET 3. C 4. HTML5 5. JavaScript 6. Swift

用于iOS开发的语言如下: 1. Objective-C 2. .NET 3. C 4. HTML5 5. JavaScript 6. Swift

8. Explain App ID.

8.解释应用程序ID。

It is primarily used to identify one or more apps from a Unique Development team. It consists of a string divided into two parts. The string includes a Team ID and a Bundle ID Search String with a separator as a period. The Team ID is allocated by Apple and is different for every development team. A Bundle ID Search String is supplied by the App Developer.

它主要用于识别唯一开发团队中的一个或多个应用程序。 它由分为两部分的字符串组成。 该字符串包括团队ID和捆绑ID搜索字符串,其中以句点作为分隔符。 团队ID由Apple分配,并且每个开发团队都不同。 应用程序开发人员提供了捆绑包ID搜索字符串。

9. Explain usage of struct.

9.解释struct的用法。

struct is a Datatype in C Programming Language that enables encapsulation of other pieces of data into a single cohesive unit. It is similar to an object but in C Programming Language.

struct是C编程语言中的一种数据类型,它可以将其他数据封装到单个内聚单元中。 它类似于对象,但使用C编程语言。

10. What is an Object?

10.什么是对象?

Objects are essentially the variables that are of Class types. Objects are basic Run-Time entities in an Object oriented system. They may represent a place, a bank account or a person.

对象本质上是属于类类型的变量。 对象是面向对象系统中的基本运行时实体。 他们可能代表一个地点,一个银行帐户或一个人。

11. Enlist the methods to achieve Concurrency in iOS.

11.争取在iOS中实现并发的方法。

The following listed are the methods to achieve concurrency functionality in iOS: 1. Threads 2. Dispatch Queues 3. Operation Queues

以下列出了在iOS中实现并发功能的方法: 1.线程 2.调度队列 3.操作队列

12. What is Cocoa?

12.什么是可可粉?

Cocoa is an Application Development Environment for Mac OS X Operating System and iOS. It includes Compilations of a Runtime System, Object-Oriented Software Libraries and an Integrated Development Environment.

Cocoa是适用于Mac OS X操作系统和iOS的应用程序开发环境。 它包括运行时系统,面向对象的软件库和集成开发环境的编译。

13. What is a Framework?

13.什么是框架?

It is basically a conceptual structure or a scheme with an intension to support the expansion of the structure into something useful. A Framework is a layered structure indicating what kind of programs can or should be built and how they would interact. Frameworks includes actual programs that mentions programming interfaces and programming tools for working with the frameworks.

它基本上是概念性结构或旨在支持将结构扩展为有用内容的方案。 框架是分层的结构,指示可以或应该构建什么样的程序以及它们如何交互。 框架包括提及程序设计接口和用于框架的编程工具的实际程序。

14. Explain keywords alloc and new.

14.解释关键字alloc和new。

The alloc keyword is used to create a New Memory Location in the System. However, it does not initialize it. In case of New keyword, it also helps to create a New Memory Location in the system. However, it can initialize the Contents unlike the alloc keyword.

alloc关键字用于在系统中创建新的内存位置。 但是,它不会初始化它。 如果使用New关键字,它也有助于在系统中创建一个New Memory Location。 但是,与alloc关键字不同,它可以初始化Contents。

15. What are Selectors in Objective-C?

15. Objective-C中的选择器是什么?

A Selector in Objective C can be used to refer the name of a method when it is used in a Source-Code message to an Object. It also refers to the unique identifiers that can replace the Name when the Source Code is being Compiled. All the methods that have the same name have the same selector.

当在源代码消息中将对象用于对象时,可以使用目标C中的选择器来引用方法的名称。 它还指的是在编译源代码时可以替换名称的唯一标识符。 具有相同名称的所有方法都具有相同的选择器。

16. Enlist Frameworks for Cocoa.

16.争取可可框架。

The Frameworks developed for Cocoa are listed as follows: 1. Foundation 2. Application Kit

为可可开发的框架如下: 1.基础 2.应用套件

17. What is Bundle ID?

17.什么是捆绑包ID?

The Bundle ID uniquely defines every iOS Application. It is specified in Xcode. It is a Search String which is supplied by the Application Developer to match either the Bundle ID of a Single Application or a Set of Bundle IDs for a Group of Applications.

捆绑包ID唯一定义每个iOS应用程序。 它在Xcode中指定。 它是由应用程序开发人员提供的搜索字符串,以匹配单个应用程序的捆绑ID或一组应用的捆绑ID。

18. What is a Class?

18.什么是课程?

The entire set of data of an object can be made a user-defined data type using a class. Objects are basically variables of Class type. Once a Class has been defined, it is possible to create multiple Objects of its type. A Class is a collection of Objects of similar type.

可以使用类将对象的整个数据集设置为用户定义的数据类型。 对象基本上是Class类型的变量。 一旦定义了一个类,就可以创建其类型的多个对象。 类是相似类型的对象的集合。

19. Explain the difference between Inheritance and Category.

19.解释继承和类别之间的区别。

Category enables to add methods only. It does not allow the inclusion of Data Members unlike Inheritance where both the Data and Methods can be added. Category includes Complete Application in its Scope whereas Inheritance’s scope is only within that particular File.

类别仅允许添加方法。 它不允许包含与继承不同的数据成员,在继承中不能同时添加数据和方法。 类别在其范围内包括完整应用程序,而继承的范围仅在该特定文件内。

20. Explain App Bundle.

20.解释应用程序捆绑包。

During iOS application development, Xcode packages it as a bundle. A Bundle is a file directory that combines related resources together in one place. It contains the Application Executable File and supports Resource Files such as Localized Content, Image Files and Application Icons.

在iOS应用程序开发过程中,Xcode将其打包为一个捆绑包。 捆绑包是一个文件目录,它将一个地方的相关资源组合在一起。 它包含应用程序可执行文件,并支持资源文件,例如本地化内容,图像文件和应用程序图标。

21. What is Swift?

21.什么是Swift?

Swift is a programming language for development of applications for OS X, iOS, watchOS, and tvOS. These applications are developed using C and Objective-C. It does not have the constraints of C Programming. It has features for easier development and provides more flexibility.

Swift是用于开发OS X,iOS,watchOS和tvOS应用程序的一种编程语言。 这些应用程序是使用C和Objective-C开发的。 它没有C编程的约束。 它具有易于开发的功能,并提供了更大的灵活性。

22. What is a Protocol in Objective-C Programming Language?

22. Objective-C编程语言中的协议是什么?

A Protocol is used to define a list of required optional methods that a class needs to implement. If a class adopts a protocol, it must implement all the needed methods in the protocols it adopts. It is identical to an Interface in Java and also to a purely Virtual Class in C++. Cocoa uses protocols to support interprocess communication through Objective-C messages.

协议用于定义类需要实现的必需的可选方法的列表。 如果类采用协议,则它必须在其采用的协议中实现所有必需的方法。 它与Java中的接口相同,也与C ++中的纯虚拟类相同。 可可使用协议来支持通过Objective-C消息进行进程间通信。

23. Explain Formal Protocols.

23.解释正式协议。

Formal Protocols enables defining an Interface for a Set of Methods without any implementation. It is useful with DistributedObjects as they allow defining a protocol for communication between objects.

正式协议允许无需任何实现即可为一组方法定义接口。 这对DistributedObjects很有用,因为它们允许定义对象之间通信的协议。

24. What is Polymorphism?

24.什么是多态?

It enables a methods to exhibit different behaviours under different instances. The task of creating a Function or an Operator behave differently in different instances is known as Operator Overloading which is an implementation of Polymorphism.

它使方法在不同情况下表现出不同的行为。 创建函数或运算符在不同实例中行为不同的任务称为运算符重载,它是多态性的一种实现。

25. Differentiate between Release and Pool Drain.

25.区分释放和池排放。

The release keyword is used to free a memory location in the system which is not being utilized. The drain keyword is used to release the NSAutoreleasePool.

release关键字用于释放系统中未被利用的内存位置。 漏极关键字用于释放NSAutoreleasePool。

26. What is a Collection?

26.什么是收藏集?

A Collection is a Foundation Framework Class that is used to Manage and Store the group of Objects. The primary role of a Collection is to store Objects in the form of either a Set, a Dictionary or an Array.

集合是用于管理和存储对象组的Foundation Framework类。 集合的主要作用是以集合,字典或数组的形式存储对象。

27. Explain the significance of AutoRelease.

27.解释自动发布的重要性。

AutoRelease: When you send an Object AutoRelease message, it gets added to the Local AutoRelease Pool. When the AutoRelease Pool gets destroyed, the Object will receive a Release message. The Garbage Collection functionality will destroy the Object if it has the RetainCount as Zero.

自动释放:发送对象自动释放消息时,它将被添加到本地自动释放池中。 当自动释放池被销毁时,对象将收到释放 消息。 如果RetainCount为零,则垃圾回收功能将销毁该对象。

28. What is the First Responder and Responder Chain.

28.什么是第一响应者和响应者链。

A Responder Chain is a hierarchy of Objects that can respond to the events received. The first object in the ResponderChain is called the First Responder.

响应者链是可以响应收到的事件的对象的层次结构。 ResponderChain中的第一个对象称为“第一响应者”。

29. Explain Web Services?

29.解释Web服务?

The Web Services are the Application Components which enables communication using Open Protocols. These Web Services are Self – Describing and Self – Contained. Web Services can be found out by using UDDI. The base for development of Web Services functionality is Extensible Markup Language (XML).

Web服务是允许使用开放协议进行通信的应用程序组件。 这些Web服务是自描述的和自包含的。 可以使用UDDI找到Web服务。 Web服务功能开发的基础是可扩展标记语言(XML)。

30. Explain the difference between Cocoa and Cocoa Touch?

30.解释可可粉和可可粉之间的区别吗?

Cocoa is an Application Framework that enables development of Applications in Mac OS X Environment. It is basically a combination of two Frameworks i.e., Appkit Framework and Foundation Framework. Cocoa Touch is an Application Framework for iPod Touch. Iphone and iPad. It includes the Foundation Framework and UIKit Framework.

Cocoa是一个应用程序框架,可用于在Mac OS X环境中开发应用程序。 它基本上是两个框架的组合,即Appkit框架和Foundation框架。 Cocoa Touch是iPod Touch的应用程序框架。 Iphone和iPad。 它包括基础框架和UIKit框架。

31. Explain plist.

31.解释plist。

Plist represents Property Lists. It is a key-value store for the Application to Save and Retrieve persistent data values. This is specifically used for iPhone development. It is basically and XML File.

Plist代表属性列表。 它是应用程序的键值存储,用于保存和检索持久数据值。 这专门用于iPhone开发。 它基本上是XML文件。

32. Explain IPA.

32.解释《近期行动计划》。

IPA represents iOS App Store Package. It has an .ipa extension which represents iPhone application archive file that stores an iPhone application. Every file is compressed with a Binary for the ARM architecture and can only be installed on an iPhone, ipad or an iPod Touch. It is mostly encrypted with Apple’s FairPlay DRM Technology.

IPA代表iOS App Store软件包。 它具有.ipa扩展名,代表存储iPhone应用程序的iPhone应用程序存档文件。 每个文件都使用用于ARM体系结构的二进制文件压缩,并且只能安装在iPhone,ipad或iPod Touch上。 它主要使用Apple的FairPlay DRM技术进行加密。

33. Which JSON Framework is supported by iOS?

33. iOS支持哪种JSON框架?

SBJSON is the framework that is supported by iOS. It is a generator and a JSON Parser for Objective-C. SBJSON provides flexible APIs and also makes JSON handling easier.

SBJSON是iOS支持的框架。 它是Objective-C的生成器和JSON解析器。 SBJSON提供了灵活的API,也使JSON处理更加容易。

34. Explain Inheritance.

34.解释继承。

Inheritance is an Object Oriented Programming concept. It allows to develop a New Class that is reusable and can extend the behaviour that is defined in another class.

继承是一种面向对象的编程概念。 它允许开发一个可重用的新类,并可以扩展在另一个类中定义的行为。

35. How is it possible to improve Battery Life during execution of an Application?

35.在执行应用程序期间如何改善电池寿命?

An application is notified whenever the Operating System transfers the application between Background and Foreground. It helps in extended battery life by determining the exact functionalities in the background and thereby also helps in a better User Experience with the Foreground Application.

每当操作系统在Background和Foreground之间传输应用程序时,都会通知该应用程序。 通过确定背景中的确切功能,它有助于延长电池寿命,从而也有助于在前景应用程序中获得更好的用户体验。

36. Does iOS supports Multi-Tasking functionality?

36. iOS是否支持多任务功能?

Multi-Tasking functionality is supported from iOS versions 4 and the later ones. Multi-Tasking is a feature that enables applications to remain in the background until it is re-launched or terminated.

iOS版本4和更高版本支持多任务功能。 多任务是一项功能,使应用程序可以保留在后台,直到重新启动或终止它为止。

37. What is Xcode?

37.什么是Xcode?

Xcode is a combination of Software Development Tools developed by Apple for developing applications. It is an Integrated Development Environment (IDE). It is primarily used for development of iOS and OS X applications.

Xcode是Apple为开发应用程序而开发的软件开发工具的组合。 它是一个集成开发环境(IDE)。 它主要用于开发iOS和OS X应用程序。

38. Explain Layer Objects.

38.解释层对象。

Layer Objects are Data Objects that represent the Visual Content. They are used to render the Content. Layer Objects can be customized and these custom layer objects are used to implement Complex Animations and other types of sophisticated Visual Effects.

图层对象是代表可视内容的数据对象。 它们用于呈现内容。 可以自定义图层对象,并且这些自定义图层对象用于实现复杂动画和其他类型的复杂视觉效果。

39. What framework is used to construct application’s iOS User Interface?

39.使用什么框架来构建应用程序的iOS用户界面?

The UIKit framework is the Framework that is used to develop application’s User Interface for iOS. UIKit framework provides Views, Drawingg Model, Controls, Event Handling, Windows specifically designed for a touch screen interface.

UIKit框架是用于为iOS开发应用程序的用户界面的框架。 UIKit框架提供了Views,Drawingg模型,控件,事件处理,专门为触摸屏界面设计的Windows。

40. Explain Interfaces.

40.解释界面。

Interfaces enables defining features as small groups of closly related properties, methods, and events. It defines the events, properties and methods that classes can implement.

通过接口,可以将功能定义为几组紧密相关的属性,方法和事件。 它定义了类可以实现的事件,属性和方法。

41. Enlist Frameworks for Cocoa Touch.

41.征募可可接触的框架。

The Frameworks developed for Cocoa Touch are listed as follows: 1. Foundation 2. UIKit

为Cocoa Touch开发的框架如下: 1.基础 2. UIKit

42. How can you declare a variable in Swift?

42.如何在Swift中声明变量?

Var num = 42

变量数= 42

43. What is the Maximum byte-size for a push notification to Apple Server?

43.向Apple Server推送通知的最大字节大小是多少?

The maximum memory size is 256 Bytes to send a push Notification to Apple Server.

最大内存大小为256字节,用于向Apple Server发送推送通知。

So this was the list of some important IOS interview questions and answers. If you found any information incorrect or missing in above list then please mention it by commenting below.

这就是一些重要的IOS面试问题和答案的列表。 如果您在上面的列表中发现任何不正确或缺失的信息,请在下面的评论中提及。

翻译自: https://www.thecrazyprogrammer.com/2015/11/ios-interview-questions-and-answers.html

ios面试问题

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值