Skip to content

Commit

Permalink
LBPHightedAttributedString:封装的一个关于 NSMutableAttributedString 的工具,可以对一…
Browse files Browse the repository at this point in the history
…个指定的字符串内部的字符串进行全局查找并高亮设置的小工具,具体可以查看地址
  • Loading branch information
geek-xi committed May 25, 2018
1 parent 7546408 commit e0920eb
Show file tree
Hide file tree
Showing 603 changed files with 5,908 additions and 35 deletions.
Binary file modified .DS_Store
100644 → 100755
Binary file not shown.
17 changes: 17 additions & 0 deletions Block底层研究/AppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// AppDelegate.h
// Block底层研究
//
// Created by 刘斌鹏 on 2018/5/16.
// Copyright © 2018年 杭城小刘. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;


@end

51 changes: 51 additions & 0 deletions Block底层研究/AppDelegate.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
//
// AppDelegate.m
// Block底层研究
//
// Created by 刘斌鹏 on 2018/5/16.
// Copyright © 2018年 杭城小刘. All rights reserved.
//

#import "AppDelegate.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
return YES;
}


- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}


- (void)applicationDidEnterBackground:(UIApplication *)application {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}


- (void)applicationWillEnterForeground:(UIApplication *)application {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}


- (void)applicationDidBecomeActive:(UIApplication *)application {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}


- (void)applicationWillTerminate:(UIApplication *)application {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}


@end
98 changes: 98 additions & 0 deletions Block底层研究/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
6 changes: 6 additions & 0 deletions Block底层研究/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
25 changes: 25 additions & 0 deletions Block底层研究/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A277" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
24 changes: 24 additions & 0 deletions Block底层研究/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A277" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
45 changes: 45 additions & 0 deletions Block底层研究/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
15 changes: 15 additions & 0 deletions Block底层研究/ViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// ViewController.h
// Block底层研究
//
// Created by 刘斌鹏 on 2018/5/16.
// Copyright © 2018年 杭城小刘. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface ViewController : UIViewController


@end

67 changes: 67 additions & 0 deletions Block底层研究/ViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
//
// ViewController.m
// Block底层研究
//
// Created by 刘斌鹏 on 2018/5/16.
// Copyright © 2018年 杭城小刘. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

#pragma mark -- life cycle

- (void)viewDidLoad {
[super viewDidLoad];
//block 函数式编程
[self blockAsFunctionalProgramming];
//block 链式语法
[self blockAsChainSyntax];
// NSParameterAssert
[self testAssert:nil];
}

- (void)testAssert:(NSString *)message{
NSParameterAssert( message.length > 0);
NSLog(@"%@",message);
}

- (void)blockAsChainSyntax{
self.prepare.play(@"女人");
}

- (void)blockAsFunctionalProgramming{
[self reprepare:^{
NSLog(@"接下来玩女人,好不好?😊");
}];
}

#pragma mark -- private method

- (ViewController *(^)(NSString *))play{
NSLog(@"即将吃喝玩乐");
ViewController *(^block)(NSString *) = ^ViewController *(NSString *fun){
NSLog(@"接下来玩%@,好不好?",fun);
return self;
};
return block;
}

- (ViewController *)prepare{
NSLog(@"我们先好好休息一下。😂\n");
return self;
}


- (void)reprepare:(void(^)(void))replay{
NSLog(@"我们先好好休息一下。😂\n");
replay();
}


@end
16 changes: 16 additions & 0 deletions Block底层研究/main.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// main.m
// Block底层研究
//
// Created by 刘斌鹏 on 2018/5/16.
// Copyright © 2018年 杭城小刘. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "AppDelegate.h"

int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
Empty file modified CALayer基本操作/AppDelegate.h
100644 → 100755
Empty file.
Empty file modified CALayer基本操作/AppDelegate.m
100644 → 100755
Empty file.
Empty file modified CALayer基本操作/Assets.xcassets/.DS_Store
100644 → 100755
Empty file.
Empty file.
Empty file modified CALayer基本操作/Assets.xcassets/Contents.json
100644 → 100755
Empty file.
Empty file modified CALayer基本操作/Assets.xcassets/temp.imageset/Contents.json
100644 → 100755
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified CALayer基本操作/Base.lproj/LaunchScreen.storyboard
100644 → 100755
Empty file.
Empty file modified CALayer基本操作/Base.lproj/Main.storyboard
100644 → 100755
Empty file.
Empty file modified CALayer基本操作/Info.plist
100644 → 100755
Empty file.
Empty file modified CALayer基本操作/ViewController.h
100644 → 100755
Empty file.
Empty file modified CALayer基本操作/ViewController.m
100644 → 100755
Empty file.
Empty file modified CALayer基本操作/main.m
100644 → 100755
Empty file.
Empty file modified Category中增加属性/AppDelegate.h
100644 → 100755
Empty file.
Empty file modified Category中增加属性/AppDelegate.m
100644 → 100755
Empty file.
Empty file.
Empty file modified Category中增加属性/Base.lproj/LaunchScreen.storyboard
100644 → 100755
Empty file.
Empty file modified Category中增加属性/Base.lproj/Main.storyboard
100644 → 100755
Empty file.
Empty file modified Category中增加属性/Info.plist
100644 → 100755
Empty file.
Empty file modified Category中增加属性/UIButton+propertyTest.h
100644 → 100755
Empty file.
Empty file modified Category中增加属性/UIButton+propertyTest.m
100644 → 100755
Empty file.
Empty file modified Category中增加属性/ViewController.h
100644 → 100755
Empty file.
Empty file modified Category中增加属性/ViewController.m
100644 → 100755
Empty file.
Empty file modified Category中增加属性/main.m
100644 → 100755
Empty file.
17 changes: 17 additions & 0 deletions KVO 底层原理剖析/AppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// AppDelegate.h
// KVO 底层原理剖析
//
// Created by 杭城小刘 on 2018/3/26.
// Copyright © 2018年 杭城小刘. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;


@end

Loading

0 comments on commit e0920eb

Please sign in to comment.