Giter Site home page Giter Site logo

paingsoe93 / ios-cardlist-tableview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hahmadi82/ios-cardlist-tableview

0.0 2.0 0.0 1.22 MB

An Objective-C template that allows customizing a UITableView to display a card-style list.

Objective-C 100.00%

ios-cardlist-tableview's Introduction

iOS-CardList-TableView

An Objective-C template that allows customizing a UITableView to display a list of card-style cells, along with a header area at the top.

When I was learning Objective-C, I found it difficult to customize a UITableView to have a slicker, customized look with floating cards, like: https://github.com/hahmadi82/iOS-CardList-TableView/blob/master/CardList%20Example.png

I've created a customizable template so anyone can easily create cooler-looking UITables with a floating card-style look (instead of a list-style look): https://github.com/hahmadi82/iOS-CardList-TableView/blob/master/CardList%20Template.png

Many popular apps use this card-style interface.

Easy Set-Up

All you need to do is tweak the list of attributes (in CardListController.m) and, voila, you have a card-style list:

#define CARD_SEPARATOR 30.0
#define CARD_HEIGHT 115.0
#define CARD_WIDTH 300.0
#define CARD_COLOR [UIColor whiteColor]
#define NUMBER_OF_CARDS 5.0
#define CORNER_RADIUS 10.0

#define HEADER_HEIGHT 115.0
#define HEADER_COLOR [UIColor whiteColor]
#define HEADER_ON 1

I've also added the option of having a header area for any unique content that should be displayed at the top of the UITableView (turned on and off by the HEADER_ON constant).

Things to Consider

  1. After formatting the cards, you can create your card content in the addContent method of CardListCell.m. A card title example is included.

  2. If utilizing the header area, you can add header content to the viewDidLoad method of CardListController.m. A header title example is included.

  3. The floating effect of the cards is aided by the static background image displayed in the didFinishLaunchingWithOptions method located in CardListAppDelegate.m. It's important to add a background image to the subview of the class displaying the CardListController. This does not need to be done in the app delegate. A placeholder background is included in the template.

  4. Feel free to customize any aspect of this template to suit your needs. The comments should help you understand how everything works, if you wish for deeper customization.

Enjoy!

ios-cardlist-tableview's People

Contributors

hahmadi82 avatar

Watchers

 avatar  avatar

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.