Digit number for iOS
Because I found the font of Digit number 1's font width is less then other's digit number.
DigitNumber supports multiple methods for installing the library in a project.
CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like DigitNumber in your projects. See the "Getting Started" guide for more information. You can install it with the following command:
$ gem install cocoapods
To integrate DigitNumber into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'TargetName' do
pod 'DigitNumber', '~> 0.0.4'
end
Then, run the following command:
$ pod install
copy files on the below to your project
DigitNumber.h
DigitNumber.m
[self.timeView setFontSize:40];
[self.timeView setFontPadding:8];
[self.timeView setFontColor:[UIColor blackColor]];
[self.timeView setTextAlias:DN_ALIGH_CENTER];
[self.timeView setContent:@"23:28:08"];