libextobjc
所属分类:C/C++工具库
开发工具:Objective-C
文件大小:74KB
下载次数:0
上传日期:2019-04-23 07:16:41
上 传 者:
sh-1993
说明: libextobjc,一个Cocoa库,用于扩展Objective-C编程语言。
(libextobjc,A Cocoa library to extend the Objective-C programming language.)
文件列表:
Configuration (0, 2018-10-12)
ISSUE_TEMPLATE.md (318, 2018-10-12)
LICENSE.md (1063, 2018-10-12)
PULL_REQUEST_TEMPLATE.md (318, 2018-10-12)
Tests (0, 2018-10-12)
Tests\EXTADTTest.h (178, 2018-10-12)
Tests\EXTADTTest.m (7960, 2018-10-12)
Tests\EXTConcreteProtocolTest.h (636, 2018-10-12)
Tests\EXTConcreteProtocolTest.m (5283, 2018-10-12)
Tests\EXTCoroutineTest.h (294, 2018-10-12)
Tests\EXTCoroutineTest.m (1169, 2018-10-12)
Tests\EXTKeyPathCodingTest.h (208, 2018-10-12)
Tests\EXTKeyPathCodingTest.m (2323, 2018-10-12)
Tests\EXTKeypathWeakWarningTest.h (207, 2018-10-12)
Tests\EXTKeypathWeakWarningTest.m (679, 2018-10-12)
Tests\EXTNilTest.h (310, 2018-10-12)
Tests\EXTNilTest.m (2040, 2018-10-12)
Tests\EXTObjectiveCppCompileTest.h (239, 2018-10-12)
Tests\EXTObjectiveCppCompileTest.mm (225, 2018-10-12)
Tests\EXTRuntimeExtensionsTest.h (343, 2018-10-12)
Tests\EXTRuntimeExtensionsTest.m (8325, 2018-10-12)
Tests\EXTRuntimeTestProtocol.h (250, 2018-10-12)
Tests\EXTSafeCategoryTest.h (323, 2018-10-12)
Tests\EXTSafeCategoryTest.m (1577, 2018-10-12)
Tests\EXTScopeTest.h (316, 2018-10-12)
Tests\EXTScopeTest.m (5730, 2018-10-12)
Tests\EXTSelectorCheckingTest.h (295, 2018-10-12)
Tests\EXTSelectorCheckingTest.m (765, 2018-10-12)
Tests\EXTSynthesizeTest.h (253, 2018-10-12)
Tests\EXTSynthesizeTest.m (3566, 2018-10-12)
Tests\OSX-Info.plist (679, 2018-10-12)
Tests\iOS-Info.plist (620, 2018-10-12)
extobjc.xcodeproj (0, 2018-10-12)
extobjc.xcodeproj\project.pbxproj (49267, 2018-10-12)
extobjc.xcodeproj\project.xcworkspace (0, 2018-10-12)
extobjc.xcodeproj\project.xcworkspace\contents.xcworkspacedata (152, 2018-10-12)
... ...
The Extended Objective-C library extends the dynamism of the Objective-C programming language to support additional patterns present in other programming languages (including those that are not necessarily object-oriented).
libextobjc is meant to be very modular “ most of its classes and modules can be used with no more than one or two dependencies.
# Features
libextobjc currently includes the following features:
* **Safe categories**, using EXTSafeCategory, for adding methods to a class without overwriting anything already there (identifying conflicts for you).
* **Concrete protocols**, using EXTConcreteProtocol, for providing default implementations of the methods in a protocol.
* **Simpler and safer key paths**, using EXTKeyPathCoding, which automatically checks key paths at compile-time.
* **Compile-time checking of selectors** to ensure that an object declares a given selector, using EXTSelectorChecking.
* **Easier use of weak variables in blocks**, using `@weakify`, `@unsafeify`, and `@strongify` from the EXTScope module.
* **Scope-based resource cleanup**, using `@onExit` in the EXTScope module, for automatically cleaning up manually-allocated memory, file handles, locks, etc., at the end of a scope.
* **Algebraic data types** generated completely at compile-time, defined using EXTADT.
* **Synthesized properties for categories**, using EXTSynthesize.
* **Block-based coroutines**, using EXTCoroutine.
* **EXTNil, which is like `NSNull`, but behaves much more closely to actual `nil`** (i.e., doesn't crash when sent unrecognized messages).
* **Lots of extensions** and additional functionality built on top of ``, including extremely customizable method injection, reflection upon object properties, and various functions to extend class hierarchy checks and method lookups.
The [experimental](https://github.com/jspahrsummers/libextobjc/tree/experimental)
branch contains additional features that may be interesting, but are not
considered stable or safe for production use. Check out the headers for more
information.
# Running tests
To execute libextobjc's tests, first run `git submodule update --init --recursive`
to bring in the [xcconfigs](https://github.com/jspahrsummers/xcconfigs) submodule,
then open the project file and choose the desired test target.
# Adding to your project
If you want to add libextobjc as a dependency to an **application**, add the
repository as a [submodule](http://git-scm.com/book/en/Git-Tools-Submodules),
then include the source files you care about in your Xcode project.
If you want to add libextobjc as a dependency to a **framework or library**,
prefer [subtree merging](http://git-scm.com/book/en/Git-Tools-Subtree-Merging),
which will allow you to rename symbols to avoid conflicts, and make any tweaks
you need to for your library.
To create a libextobjc subtree:
```
$ git remote add libextobjc https://github.com/jspahrsummers/libextobjc.git
$ git fetch libextobjc
$ git read-tree --prefix=External/ -u libextobjc/master
$ git reset
```
Rename any symbols or change whatever you want, `git add` the specific files
that you want in your library, and then add them to your Xcode project.
To bring in upstream changes later:
```
$ git fetch -p libextobjc
$ git merge -Xsubtree=External/ libextobjc/master
$ git reset
```
Then, again, just add the changes you want.
# License
Released under the MIT License. See the
[LICENSE](https://github.com/jspahrsummers/libextobjc/blob/master/LICENSE.md)
file for more information.
# Requirements
libextobjc must be built with ARC enabled, and many of its macros require ARC in the calling files as well. MRR usage is not supported.
近期下载者:
相关文件:
收藏者: