• Stars
    star
    1,222
  • Rank 38,381 (Top 0.8 %)
  • Language
    Objective-C
  • License
    Other
  • Created over 12 years ago
  • Updated almost 12 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PrettyKit for iOS is a small set of new widgets and UIKit subclasses that gives you a deeper UIKit customization. You will be able to change their background color, add gradients, shadows, etc.

PrettyKit 0.2.0

PrettyKit is a small set of new widgets and UIKit subclasses that gives you a deeper UIKit customization. You will be able to change their background color, add gradients, shadows, etc.

At the time of writing these docs, there are subclasses for UITableViewCell, UINavigationBar and UITabBar, and several custom cells.

Here are some examples of what you can achieve:

Documentation

Full documentation can be found here: http://vicpenap.github.com/PrettyKit

Using it

First:

  • Copy all files under the PrettyKit folder.
  • #import "PrettyKit.h" where you need it.

Then, just change all your references to UI classes to Pretty classes, and you're done.

You'll find further information on how to use the classes in the docs: http://vicpenap.github.com/PrettyKit

Customization

All Pretty objects' properties have default values, but you can freely change them.

Pretty Cell

Grouped tables

You can change the cell's appearance as follows:

  • cell's shadow (border will be disabled when the shadow is enabled).
  • cell's background color or gradient.
  • cell's border color (border will be disabled when the shadow is enabled).
  • cell's corner radius.
  • cell's separator.
  • cell's selection gradient.
Plain tables

You can change the cell's appearance as follows:

  • cell's background color or gradient.
  • cell's separator.
  • cell's selection gradient.

Pretty Navigation Bar

You can change the navigation bar appearance as follows:

  • shadow opacity
  • gradient start color
  • gradient end color
  • top line volor
  • bottom line color
  • corner radius

Pretty Tab Bar

You can change the tab bar appearance as follows:

  • gradient start color
  • gradient end color
  • separator line volor

Performance

Everything is drawn using Core Graphics, so you can expect a nice performance. Particular attention has been paid to non opaque areas, trying to reduce them as much as possible.

Current status

This framework is currently under active development. It is compatible with iOS 4.0 or higher.

## F.A.Q.

Q. How can I use PrettyNavigationBar?

A. There are two possibilities:

  • Interface Builder

If you're building your interface with Interface Builder, select the navigationBar, go to the Identity inspector and change the class to PrettyNavigationBar.

  • Programmatically

If you're creating the NavigationController programmatically, create a subclass of UINavigationController, override initWithRootViewController (or the constructors you want), and add this line:

[self setValue:[[[PrettyNavigationBar alloc] init] autorelease] forKeyPath:@"navigationBar"];

Take into account that this approach is a bit hackish, so it might be a reason for Apple to reject your app. That shouldn't happen, though.

Also take a look at this stack overflow thread, where other approaches are shown.

Q. I'm stuck with this error: [UINavigationBar setTopLineColor:]: unrecognized selector sent to instance 0x6c5dd50

A. Make sure the navigation bar is an instance of PrettyNavigationBar. Take a look at the question above.

Q. Is there a way to use the same PrettyNavigationBar customization in the entire app?

A. There is, indeed. You can either create a subclass or a category on PrettyNavigationBar, and override the properties you want to change.

For example, if you want to have a red navigationBar, you can create a RedNavigationBar subclass of PrettyNavigationBar, and override the properties topLineColor, gradientStartColor, gradientEndColor, bottomLineColor and tintColor. Then, wherever you want to use the navigation bar, add an #import "RedNavigationBar.h" at the top of the code.

Contribution

Please, please contribute with this project! Fork it, improve it and make me a pull request.

Changelog

  • 2012/08/01: v0.2.0
    • Bug fixing (memory issues, cell drawing, naming colision with new Xcode (DP3))
    • New UITableView category to add a shortcut to drop the top and bottom shadow in plain tables
    • PrettyNavigationBar can now have rounded corners
    • New widget PrettyToolbar (replacing UIToolbar)
  • 2012/04/12: Initial release (v0.1.0)

More Repositories

1

VPPDropDown

VPPDropDown is an iOS library that allows you to create dropdown-like menus in a table view, as seen in old Twitter 3 for iPhone.
Objective-C
204
star
2

VPPMap

VPPMap library for iOS simplifies the creation and management of a MKMapView, featuring automatic annotations management with their views and callouts, map region centering based on the current visible annotations, automatic annotation clustering, easy management of pins dropped by user, etc.
Objective-C
198
star
3

VPPCoreData

VPPCoreData for iOS is a Core Data wrapper with Active Record support that simplifies the task of managing data with Core Data framework. This library offers an automatic setup of Core Data and a set of methods to set and retrieve data, both in foreground and background.
Objective-C
18
star
4

VPPLocation

VPPLocation Library for iOS simplifies the task of retrieving the user location and geocoder info about it.
Objective-C
15
star
5

VPPReachability

VPPReachability Library for iOS simplifies access to the status of a given hostname.
Objective-C
8
star
6

UIColor-Upgrades

This UIColor category improves UIColor class.
Objective-C
3
star
7

portfolio

A personal web portfolio made with Play! framework. Online in http://www.victorpena.es/
Java
2
star
8

VPPImageCaching

VPPImageCaching Library for iOS is a block-based, simple, in-memory image cache.
Objective-C
2
star
9

vicpenap.github.io

CSS
2
star
10

VPPForwardGeoLocation

VPPForwardGeoLocation for iOS is a block-based library that can get locations from a given search string, something like iOS Maps application.
Objective-C
2
star
11

ios_seminar

Small iOS seminar to start with iOS development.
Objective-C
1
star
12

markdown

Markdown plugin for Playframework
Java
1
star