自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(465)
  • 收藏
  • 关注

原创 ai时间还有人坚持写博客吗?

ai时间还有人坚持写博客吗?

2024-01-25 11:24:29 389

原创 UITabelView实现HeaderSection不悬浮

【代码】UITabelView实现HeaderSection不悬浮。

2023-02-07 11:20:02 432 1

原创 电影推荐 - 塔尔

电影推荐 - 塔尔

2022-12-03 23:49:37 369

原创 电影推荐 - 亲密

电影推荐 - 亲密

2022-12-03 23:47:41 330

原创 解决iOS Retina屏幕0.5pt线宽颜色失真问题

【代码】解决iOS Retina屏幕0.5pt线宽颜色失真问题。

2022-12-03 23:45:53 294

原创 解决iOS Retina屏幕0.5pt线宽颜色失真问题

【代码】解决iOS Retina屏幕0.5pt线宽颜色失真问题。

2022-11-05 16:26:00 241

原创 iterm2代码补全插件Incremental

【代码】iterm2代码补全插件Incremental。

2022-10-06 11:09:09 559

原创 mac录屏软件LICEcap

LICEcap官网下载地址

2022-10-06 11:04:31 384

原创 清理所有NSUserdefault数据

【代码】清理所有NSUserdefault数据。

2022-09-06 12:33:04 690

原创 ios统计方法耗时

【代码】ios统计方法耗时。

2022-08-29 18:39:58 544

原创 CFHTTPMessageRef to NSDictionary

NSDictionary *headFields = CFBridgingRelease(CFHTTPMessageCopyAllHeaderFields(webSocket.receivedHTTPHeaders));

2022-08-24 21:43:53 856

原创 Multiple commands produce ‘.../xxx.app/Assets.car‘问题

私有库使用Images.xcassets会出现Assets.car生成多次导致冲突的问题.在Podfile文件添加。

2022-07-25 14:30:28 616

原创 swift读取bundle文件

if let filepath = Bundle.main.path(forResource: "test", ofType: "html") { do { } catch { }}

2022-07-19 16:25:50 1240

原创 swift获取url参数

# swift获取url参数```swiftpublic extension URL { var urlParameters: [String: String]? { guard let components = URLComponents(url: self, resolvingAgainstBaseURL: true), let queryItems = components.queryItems else { return nil } ret

2022-07-07 21:59:06 1560

原创 git update remotes list

prune : 修剪

2022-06-16 18:08:25 99

原创 [email protected]: Permission denied报错

复制id_rsa.pub内容到

2022-06-09 11:05:47 803

原创 cocoapod只更新指定库(不更新索引)

pod update xxx --no-repo-update

2022-06-09 11:02:54 1439

原创 ios判断当前线程是否是主线程

ios判断当前线程是否是主线程BOOL isMainThreadB = [[NSThread currentThread] isMainThread];

2022-05-23 18:14:40 948

原创 xcode无法分屏问题

xcode无法分屏问题View -> Editor -> Hide Focus

2022-05-18 19:49:41 335

原创 一句话生成视频(python)

1.文字自动生成图片居中, 2.自动把文字读出来生成语音, 3.把图片和文字合成mp4文件;

2022-05-10 18:27:02 2976 6

原创 navigationBarHidden导致返回手势失效的问题

navigationBarHidden导致返回手势失效的问题返回手势失效:self.navigationController.navigationBarHidden = YES;改成:self.navigationController.navigationBar.hidden = YES;就正常了, 很诡异.

2022-05-10 17:46:33 339

原创 ios获取当前方法的调用者

ios获取当前方法的调用者NSArray *syms = [NSThread callStackSymbols];NSLog(@"debug: caller: %@ ", [syms objectAtIndex:1]);

2022-05-05 10:01:29 600

原创 ios全局隐藏键盘

ios全局隐藏键盘[[UIApplication sharedApplication] sendAction:@selector(resignFirstResponder) to:nil from:nil forEvent:nil];

2022-04-27 23:09:38 290

原创 创建只有上下或者左右手势的UIPanGestureRecognizer

创建只有上下或者左右手势的UIPanGestureRecognizerPanGesture.h#import <UIKit/UIKit.h>NS_ASSUME_NONNULL_BEGINtypedef NS_ENUM(NSInteger, PanDirection) { PanDirectionVertical, PanDirectionHorizontal,};@interface PanGesture : UIPanGestureRecognizer

2022-04-18 12:22:48 367

原创 WKWebView添加header

WKWebView添加headerNSMutableURLRequest *mutableRequest = [[NSMutableURLRequest alloc] initWithURL:url cachePolicy:NSURLRequestReloadRevalidatingCacheData

2022-04-08 16:20:39 873

原创 UITextfield移动光标到行尾

UITextfield移动光标到行尾UITextPosition *position = [textField endOfDocument];textField.selectedTextRange = [textField textRangeFromPosition:position toPosition:position];

2022-04-03 21:59:34 1148

原创 解决UILabel自动换行问题

解决UILabel自动换行问题设置:// 不以单词换行label.lineBreakMode = NSLineBreakByCharWrapping;

2022-03-30 11:58:25 1285

原创 xcode M1模拟器 报错

xcode M1模拟器 报错运行报错:1.building for iOS Simulator, but linking in object file built for iOS, for architecture arm642.The linked framework ‘Pods.framework’ is missing one or more architectures required by this target: arm64解决:1.Build Settings更改:2.podf

2022-03-15 22:46:49 4116

原创 推荐学习课程: 职场写作训练

推荐学习课程: 职场写作训练得到课程, 学了前5节课, 收获很大, 我一个文科学渣都慢慢对写作开窍了, 还有二十多节, 这周学完它.

2022-02-21 11:23:46 5986

原创 推荐电影: 东北虎, 甘草披萨

推荐电影: 东北虎, 甘草披萨东北虎:豆瓣评分不高, 但真的是个好电影.电影金句:伤感是没意义的.过了今天, 明天会是多么有意思.甘草披萨:神作, 支持两个人在一起的是共同经历与互相吸引.周末看的, 晚上都有高清资源了....

2022-02-21 09:38:42 112

原创 ios关联对象给UIView添加tapBlock

ios关联对象给UIView添加tapBlock#import "UIView+tap.h"#import <objc/runtime.h>static char kActionHandlerTapGestureKey;static char kActionHandlerTapBlockKey;@implementation UIView (tap)- (void)setTapWithBlock:(void(^)(void))block { UITapGestureRe

2022-02-17 17:27:32 1251

原创 ios获取类定义

ios获取类定义- (void)viewDidLoad { [super viewDidLoad]; // ios获取类定义 int numClasses; Class *classes = NULL; numClasses = objc_getClassList(NULL, 0); if (numClasses > 0) { classes = malloc(sizeof(Class) * numClasses); n

2022-02-17 00:09:51 105

原创 ios动态创建对象

ios动态创建对象- (void)viewDidLoad { [super viewDidLoad]; // 动态创建对象 id theObject = class_createInstance(NSString.class, sizeof(unsigned)); id str1 = [theObject init]; NSLog(@"%@", [str1 class]); id str2 = [[NSString alloc] initWithString

2022-02-17 00:04:01 1358

原创 ios类和对象操作函数

ios类和对象操作函数MyClass.h@interface MyClass : NSObject<NSCopying, NSCoding>@property (nonatomic, strong) NSArray *array;@property (nonatomic, copy) NSString *string;- (void)method1;- (void)method2;+ (void)classMethod1;@endMyClass.m@interface

2022-02-16 23:58:45 626

原创 meta class调试

meta class调试meta class是一个类对象的类,当向对象发消息,runtime会在这个对象所属类方法列表中查找发送消息对应的方法,但当向类发送消息时,runtime就会在这个类的meta class方法列表里查找。所有的meta class,包括Root class,Superclass,Subclass的isa都指向Root class的meta class,这样能够形成一个闭环。#import "ViewController.h"#import <objc/runtime.h&

2022-02-16 23:10:11 556

原创 房屋价格预测-数据分析(python)

房屋价格预测-数据分析(python)dataset download(https://c.d2l.ai/stanford-cs329p/assignments.html#assignment-1)import numpy as npimport pandas as pdimport matplotlib.pyplot as pltimport seaborn as snsfrom IPython import displaydisplay.set_matplotlib_formats('sv

2022-02-11 23:34:41 2037

原创 xcode清理控制台信息

xcode清理控制台信息command + k(竟然这么久才发现, 以前都是用鼠标点击清除????)

2022-02-09 11:19:50 557

原创 UIScrollView 拖拽滑动时收起键盘

UIScrollView 拖拽滑动时收起键盘// 方法1- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView { [[[UIApplication sharedApplication] keyWindow] endEditing:YES];}// 方法2self.tableView.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag;...

2022-02-01 10:45:59 1536

原创 如何快速定位哪个 View 出现了约束警告

如何快速定位哪个 View 出现了约束警告点击xcode的Debuy View Hierarchy, 然后把出错内存地址贴到右边底部搜索栏, 就可以定位到是具体那个view了.

2022-02-01 10:05:03 1441

原创 ios千分位和小数精度位数处理

ios千分位和小数精度位数处理- (NSString *)formatDecimalNumber:(NSString *)string { if (!string || string.length == 0) { return string; } NSNumber *number = @([string doubleValue]); NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init]

2022-01-31 21:39:07 670

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除