Recently Added iOS Source Code Examples

More >
  • MGSwipeTableCell is an easy to use UITableViewCell subclass that allows to display swippable buttons with a variety of transitions.

This library is compatible with all the different ways to create a UITableViewCell: system predefined styles, programmatically created cells, cells loaded from a xib and prototype cells within a storyboard. You can use autolayout if you want.

API Reference

See MGSwipeTableCell.h header file for a complete overview of the capabilities of the class.

See MGSwipeDemo for a complete project where you can test the variety of transitions on a real device/simulator.

Usage

Basic

Integrating MGSwipeTableCell in your project is veary easy. Basically, you only have to inherit from MGSwipeTableCell instead of UITableViewCell, or directly instantiate MGSwipeTableCell instances with iOS predefined cell styles. You can layout your cell content as you are used to do, MGSwipeTableCell doesn't force you to change layouts.

Here is a example of a MGSwipeTableCell using iOS predefined styles. You can set an array of buttons to cell.leftButtons and/or cell.rightButtons properties. MGSwipeButton is a convenience class, you are not force to use it. You can use your own UIButtons or UIViews. You can configure transitions (and swipe thresholds) with the leftSwipeSettings and/or rightSwipeSettings properties

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString * reuseIdentifier = @

    MGSwipeTableCell

    09/01/2014

    MGSwipeTableCell is an easy to use UITableViewCell subclass that allows to display swippable buttons with a variety of transitions。

  • A gesture recognizer to detect taps on links and text attachments.

If you're using the most excellent TTTAttributedLabel just for the links, you might want to give this a look instead.

Usage

Add a HPTextViewTapGestureRecognizer to your UITextView, set the recognizer delegate and implement the following optional delegate methods as needed:

-(void)gestureRecognizer:(UIGestureRecognizer*)gestureRecognizer 
          handleTapOnURL:(NSURL*)URL
                 inRange:(NSRange)characterRange { }

-(void)gestureRecognizer:(UIGestureRecognizer*)gestureRecognizer
handleTapOnTextAttachment:(NSTextAttachment*)textAttachment
                 inRange:(NSRange)characterRange { }

Requirements

HPReorderTableView requires iOS 7.0 or above and ARC.

    HPTextViewTapGestureRecognizer

    09/01/2014

    A gesture recognizer to detect taps on links and text attachments。

  • Custom AlertView/HUD for iOS.

Add the following files and folders to your iOS project.

FVCustomAlertView.h
FVCustomAlertView.m
FVCustomAlertViewResources/
How to use FVCustomAlertView

FVCustomAlertView comes with 4 default modes and a cutom mode. The default modes are : (make sure you try them in the example app)

Loading

[FVCustomAlertView showDefaultLoadingAlertOnView:self.view withTitle:@

    FVCustomAlertView

    09/01/2014

    Custom AlertView/HUD for iOS.。

  • JBCountdownLabel is UILabel subclass that displays a countdown with a defined amount of seconds. So you can customise the label just like a native UILabel and add some cool actions:

Customise the number of seconds on the countdown.
You can show just the countdown or the countdown inside a sentence, you chose.
Restart the countdown.
Cancel the countdown.
Change the amount of time on the countdown.

Usage

Add the label to your view:

self.countdownLabel = [[JBCountdownLabel alloc] initWithFrame:CGRectMake(0, 50, 320, 46) format:@

    JBCountdownLabel

    08/29/2014

    A UILabel subclass that displays a countdown。

  • A UIColor category that returns the opposite value from any color.

Usage

#import

    ComplementaryColor

    08/29/2014

    A UIColor category that returns the opposite value from any color。

  • This control can be seen as an extension of Apple's UITabBarController. Though it is not a subclass, it has the same behaviour as a normal UITabBarController for tabs with a single subitem. You can, however, chose to add more subitems to one single tab which will make the tabbar animate upwards revealing all the subitems added to the tab.

Usage

Using this control is fairly easy. For each tab you want to see in the tab bar you must create an AHTabView instance and set its image and title.

    AHTabView *tab = [AHTabView new];
    [tab setImage:myImage];
    [tab setTitle:@

    AHTabBarController

    08/29/2014

    A traditional UITabBarController with possibilities of adding multiple items behind every tab。

  • This is a Page View Controller based Gallery for Images and Videos which you can use to showcase your media items. Images support zoom/pinch and you can play videos in the same window with custom theme for video controls.

    SHGalleryView

    08/29/2014

    This is a Page View Controller based Gallery for Images and Videos which you can use to showcase your media items。

  • LLARingSpinnerView is a deligthful spinner for diplaying indeterminate progress that you can use in your apps.

Simple API
Respects interface tint color
Automatically dims the tint color when an alert view or an action sheet is presented
iOS7 compatible

Usage

// Initialize the progress view
LLARingSpinnerView *spinnerView = [[LLARingSpinnerView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];

// Optionally set the current progress
spinnerView.lineWidth = 1.5f;

// Optionally change the tint color
spinnerView.tintColor = [UIColor redColor];

// Add it as a subview
[self.view addSubview:spinnerView];

...

// Spin it
[spinnerView startAnimating];

// Stop animation
[spinnerView stopAnimating];

    LLARingSpinnerView

    08/28/2014

    LLARingSpinnerView is a deligthful spinner for diplaying indeterminate progress that you can use in your apps。

  • A simple iOS menu with blur background. Uses Apple's UIImage+ImageEffects.

USAGE

Add BlurMenu and BlurMenuItemCell files to your project. Initialize your menu items with an NSArray and then initialize the BlurMenu with that NSArray.

NSArray *items = [[NSArray alloc] initWithObjects:@

    BlurMenu

    08/28/2014

    A simple iOS menu with blur background. Uses Apple's UIImage+ImageEffects。

  • A simple to use drop in replacement for UILabel for iOS 7 that provides automatic detection of colors.

How To Use

Add the files MZSelectableLabel.m and MZSelectableLabel.h to your project.
Design your user interface as you would normally. In Interface Builder set the custom class for any UILabel you want to replace to MZSelectableLabel. The label should honour all IB settings or create MZSelectableLabel objects in code.
Additional:

You can set automatic foreground color detection:

@property (nonatomic, assign, getter = isAutomaticForegroundColorDetectionEnabled) IBInspectable BOOL automaticForegroundColorDetectionEnabled;
@property (nonatomic, strong) IBInspectable UIColor *skipColorForAutomaticDetection;

    MZSelectableLabel

    08/28/2014

    A simple to use drop in replacement for UILabel for iOS 7 that provides automatic detection of colors.。

  • UITabBarController is a handy control for building user interfaces, but this control has an annoying limitation: if there are more than five tabs, a

    JFATabBarController

    08/27/2014

    JFATabBarController is a pluggable replacement for UITabBarController that eliminates this limitation。

  • CombinationPickerController is image picker use uicollection view.Custom camera controller.

    CombinationPickerController

    08/27/2014

    ombinationPickerController is image picker use uicollection view。

  • TMOSmarty is a template engine for iOS Apps.

Smarty PHP was originally written using a template engine, is one of the industry's most famous PHP template engine. It separates the logic code and external content, provides an easy to manage and use the method used to originally mixed with PHP code and HTML code for logical separation. Simply speaking, the purpose is to make PHP programmer with separate front-end staff, enables programmers to change the logical content of the program will not affect the front page design staff, the front-end staff re-edit the page without affecting the program logic program, which in the multiplayer cooperative project was particularly important.

    TMOSmarty

    08/26/2014

    TMOSmarty is a template engine for iOS Apps。

  • An iOS browser built on top of UIWebView.This projects implements tabs, bookmarks, address bar, search bar, loading indicators, and much more for UIWebView.

    banshee

    08/26/2014

    An iOS browser built on top of UIWebView。

  • 竖排的 SegmentedControl 以及抽屉效果的侧边菜单界面。很简单地框架,可以拿到就能用。
小编注:感谢开发者@___七づ夜 发布代码于Code4App.com。

    Horizontal Segments

    08/13/2014

    Horizontal SegmentedControl and side menu demo。

  • 日历控件 ,可以按月或者按周显示。滑动切换不同日期,也可以跳转到今天。
小编注:感谢开发者@Sylar曹cocos2d-x 发布代码于Code4App.com。

    PWSCalendar

    08/13/2014

    Custom calendar controller, which can display dates by week or month。

  • 实现覆盖在整个视图表面、并且淡出淡出的倒计时效果。

    SFCountdownView

    08/13/2014

    A customizable countdown overlay UIView。

  • 实现多行多列的表格。本代码是利用UIView + NSAttributed来实现这种表格的。

    Labels Matrix View

    08/13/2014

    iOS view allowing creation of grid like label structures。

Popular Code

More >
  • 使用Cocos2D, 模仿QQ连连看写的一个连连看游戏Demo,有声音效果。
小编注:感谢开发者@焕德 分享代码于Code4App。

    Picture matching game by cocos2d

    2877 downloads

    使用Coco2D, 模仿QQ连连看写的一个连连看游戏。

  • 自定义列表样式,包括在列表上加入多个控件,自定义列表的cell,header和footer。

    Custom Tableviews

    2231 downloads

    Custom UITableView's cell,header and footer。

  • 利用 cocos2d 模仿合金弹头的特种任务做的一个demo,包括几个场景,可以发射子弹、跳跃和前进。
作者说:在iphone真机retina显示屏上能运行重力感应控制方向,单指按攻击,双指按跳跃。还没开发完毕,遇到一些困难,希望有相关经验的的前辈指点或者发送一些类似游戏demo给 stonexing5@gmail.com 。
小编注:只能在真机retina显示屏上才能正确运行。感谢开发者@草庐软件 分享代码于Code4App。

    Metal Slug Demo

    2116 downloads

    Metal Slug demo made by cocos2d。

  • 实现微信选取图片并裁剪成头像的控件。

    VPImageCropper

    1844 downloads

    Crop an image to round shape for use as an user avatar。

  • 实现饼状的菜单。菜单上的按钮呈现饼状排列,用户用手指滑动选择。这种菜单常见于播放器应用。

    Pie Menu

    1733 downloads

    A pie menu implementation specially designed for iPhone and iPod touch。

  • 利用cocos2d制作的坦克大战游戏。实现效果(包括音效)非常不错。
作者说:回顾经典fc永远少不了tank大战,分享学习cocos2d过程中写的tank大战源码,希望能帮助正在学习cocos2d的同学。
小编注:感谢开发者@xzicoke 分享代码于code4app。

    tank game

    1722 downloads

    A tank game made by cocos2d。

  • 实现类似优酷客户端底部导航菜单按钮。效果十分炫,用户拖动列表是,导航按钮自动隐藏。点击某个按钮,更多按钮会从底部引出。具体效果请看视频。测试时,需将模拟器的语言区域设置成中国。
小编注:感谢@花语剑 分享代码于本站。

    Cool Menu

    1614 downloads

    A very cool menu for iOS。