ios开发常用技巧汇总 + 小功能代码

Xcode IOS开发错误汇总 【错误信息】真机调试时出现如下错误:Code Signing ErrorSigning for "*****" requires a development team.Select a development team in the project editor.Code signing is required for product for product type 'Application' ... 阅读详情

一.

1. iOS 9 以后 使用http请求 所需的配置

在Info.plist中add Row添加NSAppTransportSecurity类型Dictionary。
在NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为YES

这里写图片描述







二.

1.NSCalendar用法

-(NSString *) getWeek:(NSDate *)d
{
NSCalendar *calendar = [[NSCalendar alloc]
initWithCalendarIdentifier:NSGregorianCalendar];
unsigned units = NSYearCalendarUnit | NSMonthCalendarUnit |
NSDayCalendarUnit | NSWeekCalendarUnit;
NSDateComponents *components = [calendar components:units
fromDate:d];
[calendar release];
switch ([components weekday]) {
case1:
return @"Monday"; break;
case2:
return @"Tuesday"; break;
case3:
return @"Wednesday"; break;
case4:
return @"Thursday"; break;
case5:
return @"Friday"; break;
case6:
return @"Saturday"; break;
case7:
return @"Sunday"; break;
default:
return @"NO Week"; break;
}
NSLog(@"%@",components);
}

2.将网络数据读取为字符串

-(NSString *)getDataByURL:(NSString *)url {
return [[NSString alloc] initWithData:[NSData dataWithContentsOfURL: [NSURL URLWithString:[url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]] encoding:NSUTF8StringEncoding];
}

3.读取⺴络图⽚

-(UIImage *)getImageByURL:(NSString *)url {
return [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL: [NSURL URLWithString:[url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]]];
}

4.多线程(这种方式,只管建立线程,不管回收线程)

[NSThread detachNewThreadSelector:@selector(scheduleTask) toTarget:self withObject:nil];
-(void)scheduleTask
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[pool release];
}

如果有参数,则这么⽤

[NSThread detachNewThreadSelector:@selector(scheduleTask:) toTarget:self withObject:[NSDate date]];
-(void)scheduleTask:(NSDate *)mdate
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[pool release]; }

在线程⾥运⾏主线程⾥的⽅法

[self performSelectorOnMainThread:@selector(moveToMain) withObject:nil waitUntilDone:FALSE];

5. ⽤户缺省值NSUserDefaults读取:

NSUserDefaults *df = [NSUserDefaults standardUserDefaults];
NSArray *languages = [df objectForKey:@"AppleLanguages"];
NSLog(@"all language is %@",languages);
NSLog(@"index is %@",[languages objectAtIndex:0]);
NSLocale *currentLocale = [NSLocale currentLocale];
NSLog(@"language Code is %@",[currentLocale objectForKey:NSLocaleLanguageCode]);
NSLog(@"Country Code is %@",[currentLocale objectForKey:NSLocaleCountryCode]);

6.view之间转换的动态效果设置

SecondViewController *secondViewController = [[SecondViewController alloc] init];
secondViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;//⽔水平翻转
[self.navigationController presentModalViewController:secondViewController animated:YES];
[secondViewController release];

7.UIScrollView 滑动用法:

 -(void)scrollViewDidScroll:(UIScrollView *)scrollView
{
NSLog(@"正在滑动中。。")
}
//⽤户直接滑动UIScrollView,可以看到滑动条
-(void)scrollViewDidEndDelerating:(UIScrollView *)scrollView {
}
//通过其他控件触发UIScrollView滑动,看不到滑动条
-(void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView {
}
//UIScrollView 设置滑动不超出本⾝身范围
[scrollView setBounces:NO];

8.iphone的系统目录:


//得到Document:目录
 NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0]; //得到temp临时目录 
NSString *temPath = NSTemporaryDirectory(); //得到目录上的文件地址 
NSString *address = [paths stringByAppendingPathComponent:@"1.rtf"];

9.状态栏显⽰示indicator

[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;

10. app Icon显示数字:

- (void)applicationDidEnterBackground:(UIApplication *)application
{

 [[UIApplication sharedApplication] setApplicationIconBadgeNumber:5];
}

11. sqlite保存地址:

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectoryNSUserDomainMask, YES);
NSString *thePath = [paths objectAtIndex:0];
NSString *filePath = [thePath stringByAppendingPathComponent:@"kilometer.sqlite"];
NSString *dbPath = [[[NSBundle mainBundle] resourcePathstringByAppendingPathComponent:@"kilometer2.sqlite"];

12. 键盘弹出隐藏,textfield变位置

_tspasswordTF = [[UITextField alloc] initWithFrame: CGRectMake(100,
150, 260, 30)];
_tspasswordTF.backgroundColor = [UIColor redColor];
_tspasswordTF.tag = 2;

//添加边框
CALayer*layer = [self.pageContenter layer];
layer.borderColor= [[UIColorwhiteColor]CGColor];
layer.borderWidth=0.0f;
//添加四个边阴影
self.pageContenter.layer.shadowColor= [UIColorblackColor].CGColor;//阴影颜色
self.pageContenter.layer.shadowOffset=CGSizeMake(0,0);//阴影偏移 self.pageContenter.layer.shadowOpacity=0.5;//阴影不透明度 self.pageContenter.layer.shadowRadius=5.0;//阴影半径
⼆二、给视图加上阴影
UIView * content=[[UIView alloc] initWithFrame:CGRectMake(100, 250, 503, 500)];
content.backgroundColor=[UIColor orangeColor];
//content.layer.shadowOffset=10;
content.layer.shadowOffset = CGSizeMake(5, 3); content.layer.shadowOpacity = 0.6; content.layer.shadowColor = [UIColor blackColor].CGColor;
[self.window addSubview:content];

13. UIView有一个属性,clipsTobounds 默认情况下是NO, 如果,我们想要view2把超出的那部份隐藏起来的话,就得改变它的父视图也 就view1的clipsTobounds属性值。

view1.clipsTobounds = YES;

使用objective-c 建立UUID UUID是128位的值,它可以保证唯一性。通常,它是由机器本身网卡的MAC地址和当前系统时间来生成的。 UUID是由中划线连接而成的字符串。例如:0A326293-BCDD-4788-8F2D-
C4D8E53C108B
在声明文件中声明一个方法:

#import
@interface UUIDViewController : UIViewController { }
- (NSString *) createUUID;
@end
对应的实现文件中实现该方法:
- (NSString *) createUUID {
CFUUIDRef uuidObject = CFUUIDCreate(kCFAllocatorDefault);
NSString *uuidStr = (NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuidObject);
CFRelease(uuidObject);
return uuidStr; }

14.iPhone iPad中横屏显示代码

1、强制横屏

[application setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO];

15.在infolist⾥里⾯面加了Supported interface orientations这⼀一项,增加之后添加四个item就是 ipad的四个⽅方向

item0 UIInterfaceOrientationLandscapeLeft item1
UIInterfaceOrientationLandscapeRight

这表明只⽀支持横屏显⽰示 经常让人混淆迷惑的问题 - 数组和其他集合类

16.当一个对象被添加到一个array, dictionary, 或者 set等这样的集合类型中的时候,集合会retain它。 对应 的,当集合类被release的时候,它会发送对应的release消息给包含在其中的对象。 因此,如果你想建立一 个包含一堆number的数组,你可以像下面示例中的几个方法来做

NSMutableArray *array; int i;
// ...
for (i = 0; i < 10; i++) {
NSNumber *n = [NSNumber numberWithInt: i];
[array addObject: n]; }

在这种情况下, 我们不需要retain这些number,因为array将替我们这么做。

NSMutableArray *array;
int i;
// ...
for (i = 0; i < 10; i++) {
NSNumber *n = [[NSNumber alloc] initWithInt: i];
 [array addObject: n];
[n release];
}

在这个例子中,因为你使用了-alloc去建立了一个number,所以你必须显式的-release它,以保证retain count的平衡。因为将number加入数组的时候,已经retain它了,所以数组中的number变量不会被release

17. UIView动画停止调用方法遇到的问题

在实现UIView的动画的时候,并且使⽤用UIView来重复调⽤用它结束的回调时候要 注意以下⽅方法中的finished参数

-(void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context
{
if([finishied boolValue] == YES)
//一定要判断这句话,要不在程序中当多个View刷新的时候,就可能出现动画异常的现象 {
//执行想要的动作 }
}

18.判断在UIViewController中,viewWillDisappear的时候是push还是 pop出来

- (void)viewWillDisappear:(BOOL)animated {
NSArray *viewControllers = self.navigationController.viewControllers; if (viewControllers.count > 1 && [viewControllers
objectAtIndex:viewControllers.count-2] == self) {
// View is disappearing because a new view controller was pushed onto the
stack
NSLog(@"New view controller was pushed");
} else if ([viewControllers indexOfObject:self] == NSNotFound) { // View is disappearing because it was popped from the stack NSLog(@"View controller was popped");
} }

19. 连接字符串小技巧

NSString *string1 = @"abc / cde";
NSString *string2 = @"abc" @"cde";
NSString *string3 = @"abc" "cde";
NSLog( @"string1 is %@" , string1 );
NSLog( @"string2 is %@" , string2 ); NSLog( @"string3 is %@" , string3 );

打印结果如下: string1 is abc cde string2 is abccde

20. 随文字大小label自适应

label=[[UILabel alloc] initWithFrame:CGRectMake(50, 23, 175, 33)];
label.backgroundColor = [UIColor purpleColor];
[label setFont:[UIFont fontWithName:@"Helvetica" size:30.0]];
[label setNumberOfLines:0];
//[myLable setBackgroundColor:[UIColor clearColor]]; [self.window addSubview:label];
NSString *text = @"this is ok";
UIFont *font = [UIFont fontWithName:@"Helvetica" size:30.0];
CGSize size = [text sizeWithFont: font constrainedToSize: CGSizeMake(175.0f, 2000.0f) lineBreakMode: UILineBreakModeWordWrap];
CGRect rect= label.frame; rect.size = size;
[label setFrame: rect]; [label setText: text];

21. UILabel字体加粗

//加粗
lb.font = [UIFont fontWithName:@"Helvetica-Bold" size:20]; //加粗并且倾斜
lb.font = [UIFont fontWithName:@"Helvetica-BoldOblique" size:20];

22. 为IOS应用组件添加圆角的方法 具体的实现是使用QuartzCore库,下面我具体的描述一下实现过程:

• 首先创建一个项目,名字叫:ipad_webwiew
• 利⽤用Interface Builder添加⼀一个UIWebView,然后和相应的代码相关联 • 添加QuartzCore.framework
代码实现: 头⽂文件:

#import
#import
@interface ipad_webwiewViewController : UIViewController {
IBOutlet UIWebView *myWebView; UIView *myView;
}
@property (nonatomic,retain) UIWebView *myWebView; @end

代码实现:


- (void)viewDidLoad {
[super viewDidLoad]; //给图层添加背景图⽚片: //myView.layer.contents = (id)[UIImage
imageNamed:@"view_BG.png"].CGImage; //将图层的边框设置为圆脚
myWebView.layer.cornerRadius = 8; myWebView.layer.masksToBounds = YES; //给图层添加⼀一个有⾊色边框
myWebView.layer.borderWidth = 5; myWebView.layer.borderColor = [[UIColor colorWithRed:0.52
green:0.09 blue:0.07 alpha:1] CGColor]; }

23. 实现UIToolBar的自动消失

-(void)showBar
{
! [UIView beginAnimations:nil context:nil];
! [UIView setAnimationDuration:0.40];
! (_toolBar.alpha == 0.0) ? (_toolBar.alpha = 1.0) : (_toolBar.alpha = 0.0);
! [UIView commitAnimations];
}
- (void)viewDidAppear:(BOOL)animated {
[NSObject cancelPreviousPerformRequestsWithTarget: self];
[self performSelector: @selector(delayHideBars) withObject: nil afterDelay: 3.0];
}
- (void)delayHideBars { [self showBar];
}

24. 自定义UINavigationItem.rightBarButtonItem

UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObjects:@"remote",@"mouse",@"text",nil]];
[segmentedControl insertSegmentWithImage:[UIImage imageNamed:@"home_a.png"] atIndex:0 animated:YES];
[segmentedControl insertSegmentWithImage:[UIImage imageNamed:@"myletv_a.png"] atIndex:1 animated:YES];
segmentedControl.segmentedControlStyle = UISegmentedControlStyleBar; segmentedControl.frame = CGRectMake(0, 0, 200, 30);
[segmentedControl setMomentary:YES];
[segmentedControl addTarget:self action:@selector(segmentAction:)
forControlEvents:UIControlEventValueChanged];
UIBarButtonItem *barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:segmentedControl];
self.navigationItem.rightBarButtonItem = barButtonItem;
[segmentedControl release];

UINavigationController直接返回到根viewController

  [self.navigationController popToRootViewControllerAnimated:YES];

想要从第五层直接返回到第二层或第三层,用索引的形式

[self.navigationController popToViewController: [self.navigationController.viewControllers objectAtIndex: ([self.navigationController.viewControllers count] - 2)] animated:YES];

25. 键盘监听事件

#ifdef __IPHONE_5_0
float version = [[[UIDevice currentDevice] systemVersion] floatValue];
if (version >= 5.0)
{
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(keyboardWillShow:) name:UIKeyboardWillChangeFrameNotification object:nil];
}
#endif
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
-(void)keyboardWillShow:(NSNotification *)notification {
NSValue *value = [[notification userInfo] objectForKey:@"UIKeyboardFrameEndUserInfoKey"];
CGRect keyboardRect = [value CGRectValue]; NSLog(@"value %@ %f",value,keyboardRect.size.height); [UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.25];
keyboardHeight = keyboardRect.size.height; self.view.frame = CGRectMake(0, -(251 - (480 - 64 -
keyboardHeight)), self.view.frame.size.width, self.view.frame.size.height);
[UIView commitAnimations]; }

26、 ios6.0强制横屏的方法:

在appDelegate里调用

if (!UIDeviceOrientationIsLandscape([[UIDevice currentDevice] orientation])) {
        [[UIApplication sharedApplication]
setStatusBarOrientation:
UIInterfaceOrientationLandscapeRight animated:NO];

27.打电话

//打完后自动返回应用

 UIWebView*callWebview =[[UIWebView alloc] init];
    NSURL *telURL =[NSURL URLWithString:@"tel:10086"];// 貌似tel:// 或者 tel: 都行
    [callWebview loadRequest:[NSURLRequest requestWithURL:telURL]];
    //记得添加到view上
    [self.view addSubview:callWebview];

//电话状态监控 添加CoreTelePhone.frame 导入

#import <CoreTelephony/CTCall.h>
#import <CoreTelephony/CTCallCenter.h>
#import <CoreTelephony/CTCarrier.h>
#import <CoreTelephony/CTTelephonyNetworkInfo.h>

> 属性

@property (nonatomic, strong) CTCallCenter *callCenter;
@property (nonatomic) BOOL callWasStarted;


- (instancetype)init
{
    self = [super init];

    if (self) {

        self.callCenter = [[CTCallCenter alloc] init];
        self.callWasStarted = NO;

        __weak __typeof__(self) weakSelf = self;

        [self.callCenter setCallEventHandler:^(CTCall *call) {

            if ([[call callState] isEqual:CTCallStateIncoming] ||
                [[call callState] isEqual:CTCallStateDialing]) {

                if (weakSelf.callWasStarted == NO) {

                    weakSelf.callWasStarted = YES;

                    NSLog(@"Call was started.");
                }

            } else if ([[call callState] isEqual:CTCallStateDisconnected]) {

                if (weakSelf.callWasStarted == YES)
                {
                    weakSelf.callWasStarted = NO;


                    UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"提示" message:@"" delegate:nil cancelButtonTitle:@"确认" otherButtonTitles:nil, nil];
                    [alert show];
                    NSLog(@"Call was ended.");
                }
            }
        }];
    }

    return self;
}

28. 获取项目中的文件路径

//视频文件路径,此视频已经存入项目包中.属于本地播放
    NSString *path  = [[NSBundle mainBundle] pathForResource:@"movie" ofType:@"mp4"];
    if (path) {
        NSLog(@"已检测到所需要文件");
    }
    else{
        NSLog(@"文件不存在");
    }
    //生成一个视频URL
    NSURL *url = [NSURL fileURLWithPath:path];





三

1.修改导航栏的底线

通过图片来修改导航栏的黑色底线

-(void)viewWillAppear:(BOOL)animated{
//添加有一张有颜色的图片来改变底线的颜色
 [self.navigationController.navigationBar setShadowImage:nil];
    [self.navigationController.navigationBar setShadowImage:[UIImage imageWithColor:[UIColor colorWithHexString:@"#D3DCE6"] andSize:CGSizeMake(SCREEN_WIDTH, 0.5)]];

}
-(void)viewWillDisappear:(BOOL)animated{
//添加有一张空白颜色的图片来去除底线
    [self.navigationController.navigationBar setShadowImage:[UIImage new]];

}
保姆级教程:在Ubuntu 22.04上用VLLM+OpenWebUI部署DeepSeek-R1-14B(含Q8量化模型下载) 本文提供在Ubuntu 22.04上使用VLLM和OpenWebUI部署DeepSeek-R1-14B大语言模型的完整教程,包括环境配置、模型下载、VLLM参数调优及OpenWebUI集成。特别针对Q8量化模型优化部署流程,解决CUDA版本冲突等常见问题,适合开发者快速搭建本地AI对话系统。 阅读详情

相关推荐

保姆级教程:用vxe-grid给管理后台加个「智能筛选」功能(支持模糊搜索/多选/范围查询)

本文提供了一份详细的Vxe-Grid智能筛选功能实现教程。通过自定义筛选器渲染,文章逐步指导开发者为后台管理系统添加支持模糊搜索、多选下拉和数值范围查询的智能筛选功能,并分享了性能优化与移动端适配等实战经验。

weixin_29021291的博客 542

iOS开发常用的小功能(持续更新)

设置控件的四边圆角 UIView *subView = [[UIView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)]; subView.backgroundColor = [UIColor cyanColor]; // 设置圆角弧度 subView.layer.cornerRadius = 20; // 超出范围的强制剪切 subView

DaiSuke 816

Linux服务器 离线安装oracle

Linux服务器 离线安装oracle

xie_bro的博客 4276

iOS开发知识-常用小技巧大杂烩

开发过程中遇到的一些问题,网上查阅整理的一些问题,供大家参考,方便大家查阅 1. 打印View所有子视图 po [[self view]recursiveDescription] 2. layoutSubviews调用的调用时机 * 当视图第一次显示的时候会被调用 * 当这个视图显示到屏幕上了,点击按钮 * 添加子视图也会调用这个方法 * 当本视图的大小发生改变的

iOS学堂 1017

本地使用大模型:Ollama+open-webui+AnythingLLM(Windows+linux)

随着大模型的发展,大量的开源模型可以被直接使用。大模型的使用可以选择在云端或者在本地,如果本地存储空间尚可,而且模型需求不是很大的话,我们可以选择在本地部署一个大模型来使用。针对特定的任务需求,进一步在本地去微调我们的大模型。我在windows和linux上都尝试了一遍,这里记录一下过程。

wpqgt的博客 2172

半导体领域知识 - 初级入门

半导体领域知识 - 初级入门 知识问答 1. 一个晶圆上根据芯片的大小,可以生产几百、几千、几万个芯片。如下图: 2. 8寸晶圆指的是什么?5nm工艺指的是什么? 8寸晶圆指的是直径为175mm(17.5cm)的晶圆,下面是6/812/18寸晶圆的尺寸以及相关发展历程。目前拥有12寸线的厂商只有5家,一个12寸晶圆厂的成本需要上百亿美金。 5nm工艺指的是在一个具体的芯片上,有很多微型结构(千万、亿级别的晶体管),这些核心基本单元MOS管的栅极宽度尺寸来衡量工艺的精细程度,如果是5nm就被称为5nm工艺

Hello World! 2万+

iOS开发之总结几个提高开发效率的小技巧

1、创建一个宏定义的define.h文件,方便管理常用的方法或者变量名,比如获取屏幕的宽和高:#define f_Device_w         [UIScreen mainScreen].bounds.size.width,#define f_Device_h          [UIScreen mainScreen].bounds.size.height,常用的头文件等等;2、创建一个专门

hbblzjy的博客 2885

告别重复劳动:用Python+pywinauto打造你的微信个人助理(自动回复/收款/定时发消息)

本文介绍如何利用Python和pywinauto库构建微信个人助手,实现自动回复、定时消息、智能收款等功能,告别重复劳动。通过详细的代码示例和配置指南,帮助开发者快速掌握微信自动化技术,提升工作效率。

weixin_42568801的博客 339

关于iOS开发常用代码整理

差不多做完了一个iOS项目,就把个人觉得比较有用的iOS开发代码整理一下。 1.判断邮箱或者手机格式是否正确的代码 2.生成二维码 3.隐藏Status Bar 4.获取系统当前语言 5.禁止锁屏 6.修改键盘按钮return回收键盘 7.获取当前的日期,时间,星期几 8.随机数 9.头像圆形 10.获取当前scrollView的页数 11.单例的写法 12.显示简单弹窗 1.判断邮箱或者手机格式是

Caffey 703

从选型到调试:MCU外部晶振电路设计的实战避坑指南

本文详细解析了MCU外部晶振电路设计的关键要点,从选型到调试提供全面指南。重点探讨了晶振频率选择、负载电容计算、PCB布局优化等核心问题,并分享常见故障排查技巧与EMC设计经验,帮助工程师规避设计陷阱,提升嵌入式系统时钟稳定性。

weixin_30872577的博客 284

一文吃透:从零到一开发一套 ABAP RAP 应用的完整路径

ABAP RAP开发实战摘要 本文系统介绍了ABAP RESTful Application Programming Model (RAP)在企业级应用开发中的实施路径。文章以出差申请业务场景为例,详细拆解了RAP开发的六步主线流程: 数据库表设计:规范主键、审计字段设计 CDS数据建模:通过视图定义业务对象实体及关联 行为定义与实现:使用BDEF声明事务规则,Behavior Pool类实现业务逻辑 业务对象投影:裁剪服务接口视图 服务定义与绑定:按OData协议暴露服务 UI集成测试:支持Fiori E

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 526

IOS 常用的小代码

常用代码整理: 12.判断邮箱格式是否正确的代码: //利用正则表达式验证 -(BOOL)isValidateEmail:(NSString *)email { NSString *emailRegex = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}"; NSPre

hanbing861210的专栏 751

Qt垂直滚动条QVerticalScrollBar详解:从基础到实战的控件开发指南

本文系统解析Qt中QVerticalScrollBar的用法,从基础概念到进阶技巧。主要内容包括:1)基础认知:介绍其继承关系、作用及典型应用场景;2)核心用法:创建方法、关键属性配置和信号槽连接;3)进阶技巧:自定义样式表美化外观,以及与自定义内容区域的联动实现;4)实战注意事项,如避免循环触发和高DPI适配等。文章强调掌握QVerticalScrollBar对提升Qt滚动类功能开发效率的重要性,并建议通过自定义文本编辑器实践巩固知识点。

专注现代C++实战,从核心语法到高性能编程,助力开发者深入掌握系统级编程精髓。 762

iOS开发常用知识点(持续更新2018.6.25)

1、去除数组中重复的对象NSArray *newArr = [oldArr valueForKeyPath:@“@distinctUnionOfObjects.self"];2、强/弱引用#define WeakSelf(type) __weak typeof(type) weak##type = type; // weak #define StrongSelf(type) __strong ...

z979451341的博客 2532

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

iOS笔记链接

分享一波 1.使用协议代理Delegate与通知中心NSNotificationCenter实现页面传值 http://www.cocoachina.com/bbs/read.php?tid=169038 2.Protocol协议的用法以Demo说明,对于新手有帮助 http://www.cocoachina.com/bbs/read.php?tid=32173 3.关于

你有故事,我囿酒 631

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

iOS常用方法整理超全

一.富文本: /** * 富文本声明 */ + (NSMutableAttributedString *)getLableText:(NSString *)text changeText:(NSString *)changeString Color:(UIColor *)color font:(NSInteger)font; /** * 富文本实现 */ + (NSMutableAttr

努力,可能成功!放弃,注定失败! 1315

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

iOS经典讲解之Xcode开发不可不知的快捷键(新)

· Xcode快捷键 · 最常用 · cmd + A 全选 · cmd + S 保存 · cmd + X 剪切 · cmd + V 粘贴 · cmd + R/B 运行 · cmd + . 停止运行 · cmd + shift + K 清理,按按更健康 · cmd + shift + B MRC下检测内存警告 · 区域隐藏 · cmd + shift + Y 显示活隐藏最左侧目

刘新林的技术博客 836

iOS 开发知识点

一、调用代码使APP进入后台,达到点击Home键的效果。(私有API) [[UIApplication sharedApplication] performSelector:@selector(suspend)]; suspend的英文意思:悬、挂、暂停 二、获取UIWebView的高度 个人 (void)webViewDidFinishLoad:(UIWebView *)webV

Keep_Moving31038的博客 482

JS常用代码

1. PC - js 返回指定范围的随机数(m-n之间)的公式 Math.random()*(n-m)+m return false return false // event.preventDefault()会阻挡预设要发生的事件. // event.stopPropagation()会阻挡发生冒泡事件. // 而return fa...

weixin_34037515的博客 200

iOS 开发小知识点

一、调用代码使APP进入后台,达到点击Home键的效果。(私有API) [[UIApplication sharedApplication] performSelector:@selector(suspend)]; suspend的英文意思:悬、挂、暂停 二、获取UIWebView的高度 个人 (void)webViewDidFinishLoad:(UIWebView *)webV

烽火连城的博客 524

iOS开发之Xcode常用调试(Debug)技巧

一、Xcode 调试技巧之:NSLog2、Xcode调试技巧之:LLDB三、Xcode调试技巧之:断点调试(breakpoint)3.1 Breakpoint(断点)调试(1) Name 和 Condition(2) Ignore(3) action6.Sound参考资料。

yunfeihope的博客 8509

iOS开发 常用的第三方汇总

一:第三方插件 1:基于响应式编程思想的oc 地址:https://github.com/ReactiveCocoa/ReactiveCocoa 2:hud提示框 地址:https://github.com/jdg/MBProgressHUD 3:XML/HTML解析 地址:https://github.com/topfunky/hpple 4:有文字输入

AntSuperMan的博客 588

iOS开发之Xcode常用调试技巧总结 断点高级

iOS开发之Xcode常用调试技巧总结 断点 lldb

yiral的博客 2973

ios开发技巧_开发iOS 14小部件的10个技巧

ios开发技巧Widgets have been one of the top features of iOS 14 during WWDC 2020, where the biggest change ever of iOS home screen has been unveiled. On the user point of view, they represent a new type of...

weixin_26718993的博客 1719

iOS开发小技巧:私有API及不常用的API汇总

iOS开发也比较久了,什么C、C++混编啊,Unity3D融合iOS内容啊等等之类,很多看起来比较蛋疼的需求其实就是一个个小的API你没有用过或者没有见识过罢了,下面就得慢慢积累我遇见的一些新鲜的API接口,从今天开始日积月累~先自己Mark一下! 一、App icon上显示数字: 问:消息推送过来后App icon小红圈上显示数目,点击app,让消息数减1,请问点击图标的时候出发哪个函数啊?

hmxiao_1983的专栏 3310

一些常用的iOS开发网站资源分享

Android 开发程序员必备网站:http://jammk.iteye.com/blog/2335318 -------------------------------------------------------- iOS开发网站资源 图标 https://icomoon.io/app/#/select http://iconfont.cn/repositori...

nysi_i的博客 3775
上一篇: iOS、mac开源项目及库汇总
下一篇: UIApplicationDelegate中几个常用的回调方法
小毅哥哥
博客等级 码龄12年 33粉丝 75原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小毅哥哥

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值