GithubHelp home page GithubHelp logo

icofans / ios-interview-questions Goto Github PK

View Code? Open in Web Editor NEW
360.0 12.0 123.0 89 KB

iOS面试题整理,在线查看地址:https://ios.nobady.cn

ios objective-c interview interview-questions runtime runloop gcd

ios-interview-questions's Introduction

iOS面试题整理

在线查看地址:https://ios.nobady.cn

iOS面试相关问题整理,做这个的初心是希望能巩固自己的基础知识,当然也希望能帮助更多的开发者,如发现答案不准确或者不完整的可前往 Github 提交完善。

主要从以下方面做了整理:

数据结构

算法

Foundation

UIKit

WebView

内存管理

消息传递的方式

网络

数据存储

多线程

动画

图像处理

数据安全及加密

Runtime

Runloop

项目架构

设计模式

组件化

调试技巧

性能优化

源码理解

代码管理

持续集成

ios-interview-questions's People

Contributors

desperoid avatar icofans avatar qiang565057208 avatar sx924 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ios-interview-questions's Issues

# 8.PerformSelector:afterDelay:这个方法在子线程中是否起作用?

[NSRunLoop.currentRunLoop run];开启runloop后可以用了

- (void)viewDidLoad {
    [super viewDidLoad];
    queue = dispatch_queue_create("asds", DISPATCH_QUEUE_CONCURRENT);
    dispatch_async(queue, ^{
        [self performSelector:@selector(testSel:) withObject:@"asdfd" afterDelay:3];
        [NSRunLoop.currentRunLoop run];
    });
}
- (void)testSel:(id)sender{
    NSLog(@"%s=%@",__FUNCTION__,sender);
}

runloop----9.事件响应的过程?

你粘贴复制都不带思考的.

当一个硬件事件(触摸/锁屏/摇晃等)发生后,首先由 IOKit.framework 生成一个 IOHIDEvent 事件并由 SpringBoard 接收。这个过程的详细情况可以参考这里。

参考这里是哪里????????

load和initialize的区别

load和initialize方法都不用显示的调用父类的方法而是自动调用,即使子类没有initialize方法也会调用父类的方法,而load方法则不会调用父类。
“而load方法则不会调用父类”这句话不是与前面的冲突吗

Category 的实现原理

给同一个类的不同的类别中添加相同的方法.执行哪个类别中的方法由 Build Phases -》Complie Sources 的顺序决定

查找两个视图的公共父视图那个对吗

while (i < MIN((int)arrayOne.count, (int)arrayOther.count)) {
    // 倒序方式获取各个视图的父视图
    UIView *superOne = [arrayOne objectAtIndex:arrayOne.count - i - 1];
    UIView *superOther = [arrayOther objectAtIndex:arrayOther.count - i - 1];
    
    // 比较如果相等 则为共同父视图
    if (superOne == superOther) {
        [result addObject:superOne];
        i++;
    }
    // 如果不相等,则结束遍历
    else{
        break;
    }
}

查找两个视图的公共父视图那个对吗?两个view一定是都是第n个相同吗?不可以第一个view的第三个 和第二个view的第五个在一个层级吗

setNeedsDisplay ???

[setNeedsDisplay 是给当前的视图做了标记。

layoutIfNeeded 查找是否有标记,如果有标记及立刻刷新。

只有这二者合起来使用,才会起到立刻刷新的效果。]

setNeedsLayout是给视图做标记。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.