The Sticker Library is a sticker's collection view of multi-page for iOS.
The Sticker Library provide several functionality :
-
sticker's easy browse & preview.
-
update & download newer.
- iOS 8.0+
- ARC
- Click
Download ZIP
or here : download - Add both
TDStickerLibrary/
andLibraries/
folder to your project.
add Podfile
in project's root directory, content like below :
# For latest release in cocoapods
platform :ios, '8.0'
pod "TDStickerLibrary"
# Get the latest on develop
platform :ios, '8.0'
pod 'TDStickerLibrary', :git => 'https://github.com/TechD-Robin/TDStickerLibrary.git', :branch => 'develop'
# For version 0.1.1
platform :ios, '8.0'
pod 'TDStickerLibrary', :git => 'https://github.com/TechD-Robin/TDStickerLibrary.git', :tag => '0.1.1'
# or
#pod 'TDStickerLibrary', '~> 0.1.1'
-
Demo Project
- A demo project in
DemoStickerLibrary/
folder.
NOTE: the demo project is include base mechanism:
-
browse sticker library.
-
get the sticker image from user touch.
-
update sticker library data.
- A demo project in
-
Quick Run
#import "TDStickerLibrary.h" // import main header file
TDStickerLibraryViewController* controller; controller = [TDStickerLibraryViewController stickerLibaray]; if ( nil == controller ) { return; } [self presentViewController: controller animated: YES completion: nil]; // will get a empty sticker libery.
NOTE: will get a empty sticker libery.
-
Easy Sample
- Download
Resources/**/*.*
these file. - Create a
Resources/
directory to your project. - Drag the
Configure/
(step 1's sub-directory) folder intoResources/
folder, and at 'Added folders :' chooseCreate folder references
. - Reference Quick Run
- Rebuild & run project.
NOTE: these code is not yet include update mechanism.
- Download
-
Customization customize your UI configure
TDStickerLibraryViewController* controller; TDStickerLibraryCustomization * customization; customization = [TDStickerLibraryCustomization new]; if ( nil == customization ) { return; } [customization setSysStyleMasterVisionBGC: [UIColor purpleColor]]; [customization setSysStyleTitleTextColor: [UIColor lightGrayColor]]; [customization setBannerHeight: 0.0f]; [customization setTableItemSizeUsingImageOriginalProportion: YES]; //[customization ...]; controller = [TDStickerLibraryViewController stickerLibarayWithCustomization: customization]; if ( nil == controller ) { return; } [self presentViewController: controller animated: YES completion: nil];
NOTE:
-
check these configure your can customize from
TDStickerLibraryCustomization.h
. -
you must customize these properties
sysStyleXXX
likesysStyleBundleName
for system style by you self.
-
-
Get Sticker get the sticker image from user touch
[controller setFinishedStickerLibraryCallbackBlock: ^(UIImage * stickerImage) { NSLog( @"sticker image : %@", stickerImage ); }];
-
Update Data
- Setup your update file to server.
- Get the update file's URL.
- Use this URL to your update method.
- sample
- ( void ) updateConfigure { NSArray * searchKeys; NSString * updateTabSearchKey; NSString * urlString; TDStickerLibraryUpdate * updateProcedure; TDStickerLibraryCustomization * customization; updateTabSearchKey = @"UpdateTab"; urlString = @"https://docs.google.com/uc?authuser=0&id=0B1yHM9LysIXXX0JqNEdqcEZSTU0&export=download"; customization = [TDStickerLibraryCustomization new]; NSParameterAssert( nil != customization ); [customization setSystemConfigureTabUpdateDefaultKey: updateTabSearchKey]; [customization setSystemConfigureTabUpdateZpwiaopsrpsded: @"StickerLibrary"]; updateProcedure = [TDStickerLibraryUpdate stickerLibraryUpdateWithCustomization: customization]; NSParameterAssert( nil != updateProcedure ); searchKeys = [NSArray arrayWithObjects: updateTabSearchKey, nil]; [updateProcedure startUpdateSystemConfigure: urlString forSearch: searchKeys]; __weak __typeof(updateProcedure) weakUpdateProcedure; weakUpdateProcedure = updateProcedure; [updateProcedure setUpdateCompletionBlock: ^(NSDictionary * updateResponses, NSError * error, BOOL finished) { NSLog( @"resopnses : %@", updateResponses ); NSLog( @"error : %@", error ); NSLog( @"finished : %d", finished ); [weakUpdateProcedure stopProcedure]; }]; }
NOTE:
after added the update procedure, about some of customize configure of
TDStickerLibraryViewController
, must same the update's configure;- (IBAction)startAction:(id)sender { TDStickerLibraryViewController* controller; TDStickerLibraryCustomization * customization; customization = [TDStickerLibraryCustomization new]; NSParameterAssert( nil != customization ); [customization setSystemConfigureTabUpdateDefaultKey: @"UpdateTab"]; // equal update's configure. [customization setSystemConfigureTabUpdateZpwiaopsrpsded: @"StickerLibrary"]; // maybe equal update's configure. [customization setSystemConfigureTabPageUpdateZpwiaopsrpsded: @"StickerLibrary"]; // maybe equal update's configure. [customization setStickerDownloadZpwiaopsrpsded: @"StickerLibrary"]; // maybe equal update's configure. controller = [TDStickerLibraryViewController stickerLibarayWithCustomization: customization]; NSParameterAssert( nil != controller ); [controller setFinishedStickerLibraryCallbackBlock: ^(UIImage * stickerImage) { NSLog( @"sticker image : %@", stickerImage ); }]; [self presentViewController: controller animated: YES completion: nil]; }
-
Configure Files Schema
- [Table Schema - StickerLibrary - en.ods](ReferenceFiles/Documents/Table Schema - StickerLibrary - en.ods)
- [Table Schema - StickerLibrary - zh-Hant.ods](ReferenceFiles/Documents/Table Schema - StickerLibrary - zh-Hant.ods)
NOTE:
.ods file editor : OpenOffice
-
System Configure JSON Sample
- System default configure of the Tab Menu :
- [StickerLibraryTabDefault.json](ReferenceFiles/Configure - sample/StickerLibraryTabDefault.json)
- The System Update configure :
- [StickerLibrarySystemUpdate.json](ReferenceFiles/Configure - sample/StickerLibrarySystemUpdate.json)
- A Page configure :
- [1001.page.face.json](ReferenceFiles/Configure - sample/1001page.face.json),
- [1002page.weather.json](ReferenceFiles/Configure - sample/1002page.weather.json),
- [1003page.emotion.json](ReferenceFiles/Configure - sample/1003page.emotion.json).
-
Preview Image Crop PList Sample
- [warszawianka-weather.plist](ReferenceFiles/Configure - sample/warszawianka-weather.plist)
-
for be imported repositories :
-
UI Icons
-
for stickers sample :
Sorry for my English, is very weak.
Also, please help me to fix these English syntax or error words, if you have free time and want to do.
** Thanks very much! **
coming soon ~. ~
(You can support contributors of this project individually.)
Support the development of this library and author.
- USD $1 a black tea of traditional taste of Taiwan.
- USD $5 a good lunch
- USD $20 anti-hungry 72 hr
- USD $50 get a wonderful week
- other USD a kindness support for development
** Bitcoin **
- Bitcoin address
1GkUKb31JDwimpu2MJoQ1R7rjS8taX97aE
- Bitcoin URI
*** Otherwise ~ ***
You can choose to donate these foundations, like below :
- World Food Programme
- Greenpeace Foundation
- UNHCR
- unicef
- wikipedia
- World Vision
- a social welfare foundations around your life.
The list is reference, don't limit about this please.
Thanks for each donator.
TDStickerLibrary
is released under the MIT License. See LICENSE
for details.
Copyright © 2015-present Robin Hsu/Tech.D.Robin
Please provide attribution, it is greatly appreciated.