![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
iOS
沉默路人
这个作者很懒,什么都没留下…
展开
-
ViewContoller 跳转 背景透明 显示下面的ViewController
let viewController = ViewController() viewController.modalPresentationStyle = .overCurrentContext self.present(viewController, animated: true, completion: nil)将ViewController的背景设置为透明就可以了原创 2021-07-26 11:06:30 · 293 阅读 · 0 评论 -
apple M1 处理器iOS Simulato报 arm64 问题
building for iOS Simulator, but linking in object file built for iOS, for architectur方法一: Xcode > 右击 > 使用 Rosetta 打开 方法二: Xcode > Buil Settings > Build Options - Validate Workspace 改为Yes原创 2021-06-17 11:22:21 · 740 阅读 · 0 评论 -
YTPlayerView 屏蔽画中画功能
WKWebViewConfiguration+MNYoutubeConfiguration.h#import <WebKit/WebKit.h>NS_ASSUME_NONNULL_BEGIN@interface WKWebViewConfiguration (MNYoutubeConfiguration)- (BOOL)allowsPictureInPictureMediaPlayback;@endNS_ASSUME_NONNULL_ENDWKWebViewCo.原创 2021-03-03 13:48:24 · 309 阅读 · 0 评论 -
swift Localizable.string convert to csv
pod 'CSV.swift', '~> 2.4.3'实现代码import UIKitimport Foundationimport CSVclass ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() let documentsPath = NSSearchPathForDirectoriesInDomains(.document...原创 2021-02-26 16:20:08 · 201 阅读 · 0 评论 -
不同的ipad 适配 出现UITableView两边有很大的空白 有些没有空白
现在通过设置UITableView的一个属性,就可以解决ipad中的适配问题。 if ([[UIDevice currentDevice].systemVersion floatValue] >= 9.0) { self.tableView.cellLayoutMarginsFollowReadableWidth = NO;// 9.0以上才有这个属性,针对ipad。 }...原创 2020-06-17 17:44:51 · 544 阅读 · 0 评论 -
swift arc4random问题
swift 中 arc4random 用 arc4random_uniform(total) 替换 不然在32位系统中会crash原创 2020-04-13 13:47:53 · 426 阅读 · 0 评论 -
IOS UIImageView 注意问题
UIImageView 默认的userInteractionEnabled=NO 所以子View不响应点击事件原创 2018-03-14 18:00:35 · 551 阅读 · 0 评论 -
NSTimer在滑动scrollView时NSTimer不工作的问题
scrollView 滑动会切换Mode 进去 RunLoop 中的UITrackingRunloopMode ,其它Model会定时器只会运行在指定的Mode下 ,一旦Runloop进入其他模式, 定时器就不会工作了解决办法:NSTimer * timer =[NSTimer timerWithTimeInterval:1.0 target:self selecto原创 2017-12-27 10:17:23 · 1246 阅读 · 0 评论 -
iOS 键盘类型UIKeyboardType
转载链接 http://blog.csdn.net/crazyzhang1990/article/details/39965931UIKeyboardTypeDefault:UIKeyboardTypeASCIICapable:UIKeyboardTypeNumbersAndPunctuation:转载 2017-08-18 15:15:54 · 239 阅读 · 0 评论 -
Xcode 的清理
Derived Data~/Library/Developer/Xcode/DerivedData/ 删除所有 iOS Device Support~/Library/Developer/Xcode/iOS DeviceSupport/ 只保留一些常用的设备版本 不需要的全部删除Archives~/Library/Developer/Xcode/Arc原创 2017-05-18 09:30:19 · 391 阅读 · 0 评论 -
IOS UISwipeGestureRecognizer 与其它手势冲突不响应
这个代理能解决手势冲突不执行的情况 - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer{ returnTRUE;}还可...原创 2017-05-18 15:58:09 · 2512 阅读 · 0 评论 -
CocoaPods使用
CocoaPods的安装https://guides.cocoapods.org/using/getting-started.ht1.ml1. 用Xcode 创建一个项目Test2.在Test文件下面创建一个Podfile的文件文件内容:platform :ios,'8.0' //xcode版本target 'Test' do //项目Targetpod '原创 2017-05-27 14:50:38 · 181 阅读 · 0 评论