---
title: "iOS开发问题随记"
author: "sinye"
date: "2014-08-08T11:21:09Z"
tags: []
categories: ["移动开发"]
slug: "ios"
draft: false
lastmod: "2014-08-08T11:22:48Z"
id: 2101657
url: "https://sinye.iteye.com/blog/2101657"
---

学习iOS开发中的一些随记，以备忘了

(1)当出现头文件找不到报错时，选择Build Settings  -&gt;  Search Paths  -&gt;  Header Search Paths，加入依赖库的相对路径

(2)添加依赖库：Build Phases  -&gt;  Link Binary With Libraries ，点击"+"号添加

(3)可在项目预编译的Supporting Files下的项目名-prefix.pch中加入第三方库的xxx.h库文件，这样就不需要在每个.h文件中引用它

(4)如果需要混编的头文件，不使用arc，在项目Build Phases  -&gt;  Compile Sources  -&gt; 选择需要混编的.m文件，双击添加  -fno-objc-arc

(5)子线程中调用UI线程的方法：  performSelectorOnMainThread

(6)如果你的项目中引入了一些自定义的static lib，需要安装iOS-Universal-Framework-master支持，否则编译报target specifies product type 'com.apple.product-type.framework.static', but there's no such product type for the 'iphonesimulator' platform

这个错误。

如果已近安装了这个库，还是报错的话，解决办法可以参考http://blog.sina.com.cn/s/blog\_5513975701019i86.html