自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 iOS 字符串正则验证 去空格 格式化时间 向上向下取整 计算字符串占位大小 设置NSAttributedString

#import <Foundation/Foundation.h>NS_ASSUME_NONNULL_BEGIN@interface NSString (Extention)- (BOOL)isTelephoneNumber;- (BOOL)isIdentifyNumber;- (BOOL)isIdentifyNumberTest;- (BOOL)isNumber;...

2019-04-30 17:20:01 600

原创 iOS 可拖动的按钮

#import <UIKit/UIKit.h>@protocol SafeCenterButtonDelegate <NSObject>- (void)safeCenterButtonDidSelect;@end@interface SafeCenterButton : UIView@property (nonatomic, weak) id<Sa...

2019-04-29 09:10:18 820

原创 iOS 判断设备类型 宏定义导航栏和标签栏高度

由于iPhoneX系列手机的出现,导航栏和标签栏的高度不能写死,需要通过代码判断设备类型。随着iPhone X标配的iOS 11出现了safeArea的概念,可以通过safeArea获取导航栏和标签栏高度,当然低于iOS 11的肯定是正常的机型了。// 屏幕大小#define ScreenBounds [UIScreen mainScreen].bounds#defin...

2019-04-28 16:22:51 2519

原创 iOS MJRefresh封装 设置文字和字体

使用的时候调用下面的代码: self.tableView.mj_header = [MJRefreshManager defaultHeader:^{ }];#import <Foundation/Foundation.h>#import <MJRefresh/MJRefresh.h>@interface MJRefreshManager : NSObj...

2019-04-28 16:11:36 5656

原创 iOS 友盟分享(微信)

1.使用cocoapods导入友盟SDK pod 'UMCAnalytics', '~> 5.5.2' # 集成微信(精简版0.2M) pod 'UMCShare/Social/ReducedWeChat', '~> 6.9.5'2.在APPDelegate中的didFinishLaunchingWithOptions配置友盟key和微信key- (void)c...

2019-04-28 15:06:09 2396

原创 iOS 定时器的使用 在后台运行定时器

1.在APPDelegate的didFinishLaunchingWithOptions中设置[session setCategory:AVAudioSessionCategoryPlayback error:nil];[[AVAudioSession sharedInstance] setActive:NO withOptions:AVAudioSessionSetActiveOptionN...

2019-04-28 14:00:00 2341 1

原创 iOS 后台播放音乐或播报语音

适用于APP在后台持续播放本地音乐,或者使用AVSpeechSynthesizer在后台能播报语音的情况,打开Targets–>Capabilities–>BackgroundModes开关,选择第一行audio选项在AppDelegate的didFinishLaunchingWithOptions方法中添加自定义方法configAudio:- (BOOL)applicatio...

2019-04-28 12:03:53 1673

原创 iOS AVSpeechSynthesizer语音播报

使用系统自带的语音播报指定的字符串,只需要调用下面一行代码:[SpeechSynthesizerManager.shared speakOrder:@"Hello World"];AVSpeechSynthesizer文件#import <Foundation/Foundation.h>@protocol SpeechSynthesizerManagerDelegate &...

2019-04-28 11:51:22 1683

原创 Swift旋转动画

protocol RotationAnimatedProtocol { func startRotationAnimation() func stopRotationAnimation()}extension UIImageView: RotationAnimatedProtocol { func startRotationAnimation() { ...

2019-04-16 11:19:16 1035

空空如也

空空如也

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

TA关注的人

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