原创 Swift Tab選項卡滑動,看算法就行

OC 版本 CGFloat needScrollowOffsetX = CGRectGetMaxX(button.frame) - SCREEN_WIDTH / 2; if (needScrollowOffsetX < 0

原创 Swift 代理的實現

// 1. 定義協議 protocol DepartmentCellDelegate: NSObjectProtocol{ // 2. 協議方法 func returnClickCellIndex () func r

原创 Swift 自定義UICollectionViewLayout,使CollectionView橫向排列

使用 let layout = MCHorizontalPageLayout() layout.sectionInset = UIEdgeInsets(top: 1, left: 1, bottom: 1, right: 1) layou

原创 [Xcode問題] - error: cannot parse the debug map for '******': No such file or directory

lipo 文件錯誤不用管,clear就好了,主要是其他的錯誤. 一般會報如下一連串錯誤: 重點!(什麼也不用改,別亂動項目,clear完 -> 重啓Xcode)。 錯誤 1 clang: error: linker command

原创 [iOS功能]- 宏定義 單行宏定義 多行宏定義

單行宏定義 #define TOKEN [[NSUserDefaults standardUserDefaults] objectForKey:@"USER_TOKEN"] 多行宏定義 #define Login \ LoginO

原创 Tab選項卡滑動,看算法就行

func selectLabelCenter() { //計算選中label的centerX let centerX = CGFloat(self.segmentControl.selectedSegmentIndex)*

原创 [Archive問題] - Archive警告。WARNING ITMS-90076

最近進行APP轉讓,從自己的賬號轉讓到另一個的賬號,然後在Archive的時候,報錯了。 警告:WARNING ITMS-90076 如下: WARNING ITMS-90076: "Potential Loss of Keychain

原创 [Cocoapods] - Cocoapods安裝方法 x86 和 M1(全程免翻牆)

在安裝cocoapods上經歷過不少折騰,終於實現了較爲流暢的安裝過程,在此做個記錄,以便不時之需。 首先打開終端 1.安裝Homebrew /bin/zsh -c "$(curl -fsSL https://gitee.com/cunka

原创 [Xcode問題] - Module compiled with Swift 5.3.2 cannot be imported by the Swift 5.4 compile

原因:老的swift,不能在最新的xcode使用。需要重新下載 Toolchain Toolchain下載地址

原创 由於蘋果新政,IDFA要授權,獲取IDFA

import AdSupport import AppTrackingTransparency if #available(iOS 14, *) { ATTr

原创 [Archive問題] - Archive報錯。ERROR ITMS-90189

報錯:ERROR ITMS-90189 這個 ERROR ITMS-90189 錯誤是轉讓到新賬號後,用新賬號上傳出現的問題,暫時不知道什麼原因,改 version 和 Build 版本號都不好用,最後又轉回去上傳的。(碰到過該問題的小夥

原创 [Archive問題] - Archive報錯。ERROR ITMS-90704 AppIcon裏缺少1024*1024的圖片

App Store Connect Operation Error ERROR ITMS-90704: "Missing App Icon. An app icon measuring 1024 by 1024 pixels in PNG

原创 [Archive問題] - Archive警告。ERROR ITMS-90076

App Store Connect Operation Warning WARNING ITMS-90076: "Potential Loss of Keychain Access. The previous version of soft

原创 [Archive問題] - App轉讓後,Archive報錯。WARNING ITMS-90076

最近進行APP轉讓,從自己的賬號轉讓到另一個的賬號,然後在Archive的時候,報錯了。 警告:WARNING ITMS-90076 如下: WARNING ITMS-90076: "Potential Loss of Keychain