Coder Social home page Coder Social logo

ui7kit's Introduction

UI7Kit

UI7Kit is a GUI toolkit which can backport flat-style UIKit from iOS7 to iOS5/iOS6. Additionally, UI7Kit can also be used to patch legacy UIKit to UI7Kit in runtime.

NOTE: This project is not mature yet and is being refined. You may come across some bugs or unexpected behaviors for complex real-world product.

Goal

  • Import flat-style iOS7 theme to work on iOS5/6 (Except status bar and blur effect).
  • Patch the classic UIKit to UI7Kit in runtime. (Renew your legacy app just in a line!)
  • 100% UIKit compatibility.

How to use

Case 1: Dynamic patch (Mostly recommended)

#import <UI7Kit/UI7Kit.h>
[UI7Kit patchIfNeeded]; // in main.m, before UIApplicationMain()

Case 2: Partial usage

: Use UI7 instead of UI. : ex) UI7NavigationController, instead of UINavigationController

Case 3: Partial dynamic patch

#import <UI7Kit/UI7Kit.h>
[UI7<class> patchIfNeeded]; // ex) [UI7TableView patch];

Global tint color (Optional)

[[UI7Kit kit] setTintColor:<UIColor object>]

NOTE: See below to install or setup your projects.

Example

Example with current code. (0.9.6)

The phones on the left most column of the screenshot are iOS7, and the phones on the middle and right columns are iOS5 or iOS6.

Current status.

Contact methods

  • Leave a github issue. New issue.
  • Email: Address is in LICENSE or git log.
  • IRC: Visit irc://irc.freenode.org/#youknowone for instant message. (You need an IRC client)

How to run test app

Download source code

# Copy and paste this lines
git clone git://github.com/youknowone/UI7Kit.git
cd UI7Kit
pod install
open UI7Kit.xcworkspace # You should open xcwordspace

If you don't have cocoapods, visit http://www.cocoapods.org or follow steps below:

# At first, install Commoand Line Tools from XCode->Preferences->Downloads.
sudo gem install cocoapods # May takes long time
pod setup # Do not sudo here

Run test app now.

How to update

Update source code and cocoapods

git pull # if you edited code, 'git fetch origin && git rebase origin/master'
pod update
open UI7Kit.xcworkspace # You should open xcwordspace

If you have any problems with missing methods, pod update usually solves the problem.

How to install to my project

If you don't have cocoapods, visit http://www.cocoapods.org or follow steps below:

# Install Commoand Line Tools in XCode->Preferences->Downloads first.
sudo gem install cocoapods
pod setup # Do not sudo here

If you have Podfile, add 'UI7Kit'. Or follow steps below:

# Copy and paste this lines
echo "platform :ios, '5.0'" > Podfile
echo "pod 'UI7Kit'" >> Podfile
pod install
open *.xcworkspace

This command will generate or edit YourProject.xcworkspace. Open this instead of your original YourProject.xcodeproj.

Apps using UI7Kit

Authors

I am not maintaining authors list manually, but I am carefully keeping git author to track this. See:

How to install one or two components

Follow the above for installing CocoaPods, but instead make your app Podfile look like this:

pod 'UI7Kit/UI7Slider'

Individual components reference

pod 'UI7Kit/UI7ActionSheet'
pod 'UI7Kit/UI7AlertView'
pod 'UI7Kit/UI7BarButtonItem'
pod 'UI7Kit/UI7Button'
pod 'UI7Kit/UI7Color'
pod 'UI7Kit/UI7Font'
pod 'UI7Kit/UI7NavigationBar'
pod 'UI7Kit/UI7NavigationController'
pod 'UI7Kit/UI7PickerView'
pod 'UI7Kit/UI7ProgressView'
pod 'UI7Kit/UI7SegmentedControl'
pod 'UI7Kit/UI7Slider'
pod 'UI7Kit/UI7Stepper'
pod 'UI7Kit/UI7TabBar'
pod 'UI7Kit/UI7TabBarController'
pod 'UI7Kit/UI7TabBarItem'
pod 'UI7Kit/UI7TableView'
pod 'UI7Kit/UI7TableViewCell'
pod 'UI7Kit/UI7TextField'
pod 'UI7Kit/UI7Toolbar'
pod 'UI7Kit/UI7View'
pod 'UI7Kit/UI7ViewController'

Special case for Switches (pick one)

pod 'UI7Kit/UI7Switch/SevenSwitch'  # use SevenSwitch (default)
pod 'UI7Kit/UI7Switch/KLSwitch'     # use KLSwitch
pod 'UI7Kit/UI7Switch/MBSwitch'     # use MBSwitch

Do you like this project?

If this project was enjoyable for you to use, or if it was helpful, a tip would be greatly appreciated. Thank you ;)

Gittip donate button Paypal donate button

Supports

  • @lqez: who supported UI7Kit from very early stage.

  • @thomassnielsen: thanks to spread words.

  • @disjukr: thanks for support, and good luck for d2fest.

  • @christianmarth

  • @Serheo

  • @JohnKFisher: thanks for bug report. and good luck for Parlance.

  • andyaude

  • @segiddins: thanks for support, and especially for the reports and patches. UI7Kit becomes really better with you.

  • @zulkis

  • @lukaszmargielewski

  • D2 FEST awarded 3rd prize!

ui7kit's People

Contributors

bumaociyuan avatar crmitchelmore avatar dlackty avatar iday avatar it0ny avatar jboehler avatar jklausa avatar k06a avatar kieranlafferty avatar kirb avatar leehanyeong avatar mrtnjcl avatar nlap avatar redetection avatar segiddins avatar skull-squadron avatar xmkevinchen avatar youknowone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ui7kit's Issues

UITableViewCell(Accessor) bug on subclass

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MyTableViewCell setTableView:]: unrecognized selector sent to instance 0xbe2e240'
the same thing happens with indexPath property

"UIKitExtension/UIKitExtension.h" not found

I followed the exact steps mentioned in the example of test app:

Copy and paste this lines

git clone git://github.com/youknowone/UI7Kit.git
cd UI7Kit
pod install
open UI7Kit.xcworkspace # You should open xcwordspace

Below is the log:

WhoAmI:UI7Kit2 WhoAmI$ git clone git://github.com/youknowone/UI7Kit.git
Cloning into 'UI7Kit'...
remote: Counting objects: 874, done.
remote: Compressing objects: 100% (340/340), done.
remote: Total 874 (delta 528), reused 841 (delta 496)
Receiving objects: 100% (874/874), 10.58 MiB | 1.72 MiB/s, done.
Resolving deltas: 100% (528/528), done.
WhoAmI:UI7Kit2 WhoAmI$ pwd
/Users/WhoAmI/Desktop/UI7Kit2
WhoAmI:UI7Kit2 WhoAmI$ ls
UI7Kit
WhoAmI:UI7Kit2 WhoAmI$ cd UI7Kit/
WhoAmI:UI7Kit WhoAmI$ ls
LICENSE Resources UI7Kit.xcodeproj
Podfile UI7Kit UI7KitTestApp
README.md UI7Kit.png UI7KitTests
WhoAmI:UI7Kit WhoAmI$ pod install
Analyzing dependencies
Downloading dependencies
Installing FoundationExtension (0.36.2)
Installing KLSwitch (1.5)
Installing cdebug (0.1.1)
Generating Pods project
Integrating client project

[!] From now on use UI7Kit.xcworkspace.
WhoAmI:UI7Kit WhoAmI$ open UI7Kit.xcworkspace
WhoAmI:UI7Kit WhoAmI$

When I opened the UI7Kit.xcworkspace, in UI7Kit.h, it shows error "UIKitExtension/UIKitExtension.h" file not found.

I met exact the same issue when I tried to install it in my project.

UI7SearchBar

  • Dynamic patch
  • Flatten
  • initWithCoder:
  • square text field

UITableView/Cell

UITableView

  • Dynamic patch
  • Section header
  • Flatten
    • Section header/footer title
    • Shadow of sections
    • Edit buttons
    • Delete button
  • Grouped table view
  • Static table view with interface builder

UITableViewCell

  • Dynamic patch
  • Flatten
  • Background
    • Shadow
  • Selected title properties
  • Accessories

UITabBarController

Any plans to add an implementation for the UITabBarController styling?

Thanks for the great work!

Pass appstore review

This library is accessing some private methods or attributes. This may cause review failure or not. Because we cannot sure which apis are safe and which others are not, try this to simple apps and collect the results.

UISwitch

  • Dynamic patch
  • Flatten
  • Animation

Grouped TableView

Hi, great stuff.

The section header in a grouped tableview is not rendering correctly. Also, the table grid lines and input field lines are not showing. One image of correct "plain" tableview, the other of a "grouped" tableview.

screen shot 2013-07-21 at 3 22 42 pm
screen shot 2013-07-21 at 3 23 10 pm

UIToolbar

  • Dynamic patch
  • Flatten
  • initWithCoder

Crash in UI7TableView

Hi,
I got a small crash when testing this project (thanks, by the way!) on one of my apps:
In UI7TableView.m, l. 67: if the titleForHeaderInSection call returns nil, there is a crash.

Solution: Check if the title is nil before calling stringByAppendingString.

Crash at jailbreaked iOS 5.1

  • (BOOL)needsUI7Kit {
    NSArray *versionParts = [self.systemVersion componentsSeparatedByString:@"."];
    NSInteger major = [versionParts[0] integerValue];//Crash at here about se
    return major < 7;
    }

-[__NSArrayM objectAtIndexedSubscript:]: unrecognized selector sent to instance 0xce4c4b0

Change to objectAtIndex: fixed it

UIStepper looking strange when transformed

I've transformed a UIStepper (because I can't set height) using

self.stepper.transform = CGAffineTransformMakeScale(1, 0.78);

But it looks very strange in iOS6, as you can see in the image.
ios simulator screen shot 23 07 2013 12 22 14

UI7NavigationController/Bar/Item

UINavigationController

  • Dynamic patch
  • Import UI7NavigationBar
  • New view transition animation

UINavigationBar

  • Dynamic patch
  • Flatten
  • Import UI7NavigationItem
  • iOS7 transitaion animation

UINavigationItem

  • Dynamic patch
  • Import UI7BarButtonItem
  • Fine arrangement of bar buttons
  • iOS7 back button (Not faked)

UI7TextField

New UITextFiled patch makes UISearchBar uneditable

Global effects

  • Global tint
    • UI7Kit global tint
    • Integrated global tint
  • Global unhighlighting

UITabBarController/Bar/Item

UITabBarController

  • Dynamic patch
  • Import UI7TabBar

UITabBar

  • Dynamic patch
  • Flatten
  • Import UI7TabBarItem
  • Add barStyle

UITabBarItem

  • Dynamic patch
  • Fine arrangement of bar buttons
  • System buttons
    • initWithSystemItem:
    • initWithCoder:
  • Badge icon

UIStepper

  • Dynamic patch
  • Flatten
  • iOS5 support

UI7BarButtonItem

  • Dynamic patch
  • Flatten
  • System buttons
    • initWithSystemItem:
    • initWithCoder:

getting compile errors

Hi,
great stuff! But unfortunately I am getting compile errors when including this to my current App.
Errors in NSObjCRuntime.h, NSZone.h and NSObject.h all with same error, Parse issue expected identifier o unknown type name NSString...

Any idea what I am doing wrong? I followed the step in github how to include in existing project.

BR
-Jan

UIProgressView

  • Dynamic patch
  • Flatten
  • initWithCoder
  • Bar style (Suppressed)

UISlider

  • Dynamic patch
  • Color theme
  • initWithCoder
  • Flatten

UIImage retina bug

it's just me or [UIImage imageByFilledWithColor:] downscales retina images?

UIAlertView/UIActionSheet

UIAlertView

  • Dynamic patch
  • Flatten
  • Dim view
  • Seperators
  • Fine arrangement
  • Style
  • Text input
  • Showing Animation

UIActionSheet

  • Dynamic patch
  • Flatten
  • Dim view
  • Seperators
  • Fine arrangement
  • Style

Next Release

When do you plan to make a new release with the latest fixes?
Because my App is ready to release and I like to have the latest fixes included...

UI7Color issue

Duplicate interface definition for class UI7Color is the error that I am getting in UI7Color.h
screen shot 2013-08-02 at 7 35 12 am

Not working with BlocksKit (cocoa pod)

Hi, really awesome stuff. One issue I found is there is some incompatibility if UI7Kit is installed as a cocoa pod with BlocksKit as a cocoa pod. Each work find separately but when installed in the same project numerous errors are reported.

screen shot 2013-07-21 at 2 49 57 pm

Installation problem

i install cocoapods and cloning UI7Kit.

sudo gem install cocoapods
git clone git://github.com/youknowone/UI7Kit.git
cd UI7Kit
pod install

Сommand pod install print error:
[!] Unable to find a specification for FoundationExtension (~> 0.37.1).

Сommand pod setup print error:
[!] The master repo is not a git repo.

Please tell me where I'm wrong?

UIButton

  • Dynamic patch
  • Move round-rect to system button
  • Button types
  • initWithCoder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.