Coder Social home page Coder Social logo

dejo / uicustomactivityindicatorview Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 124 KB

This class is intended to provide an activity indicator view that includes a text label next to the "spinning gear" all centered nicely within the superview. It is similar to the one you see, for example, in the App Store app when it is searching and displays the usual activity indicator (the spinning gear) with a label reading "Loading..." next to it.

C 24.17% Objective-C 75.83%

uicustomactivityindicatorview's Introduction

DEJOwareActivityIndicatorView

===========================================================================
COPYRIGHT:

Copyright (C) 2010 DEJOware. All rights reserved.
Code can be freely redistruted and modified as long as the above copyright
remains.

===========================================================================
DESCRIPTION:

This class is intended to provide an activity indicator view that includes
a text label next to the "spinning gear" all centered nicely within the
superview. It is similar to the one you see, for example, in the App Store
app when it is searching and displays the usual activity indicator (the
spinning gear) with a label reading "Loading..." next to it.

===========================================================================
BUILD REQUIREMENTS

Xcode 3.2.6

===========================================================================
RUNTIME REQUIREMENTS

iOS 3.0+

===========================================================================
SUPERCLASS:

This class is subclassed from UIView (but based on UIActivityIndicatorView)

===========================================================================
PROPERTIES:

This class provides one new property: an NSString named "text" to set the
text of the label; the ellipsis (i.e. the "...") is added automatically

===========================================================================
METHODS:

- (id) initWithActivityIndicatorStyle:text:superview
  This method is similar to UIActivityIndicatorView's
  initWithActivityIndicatorStyle: but adds parameters for the text string
  for the label and the superview for this view.

===========================================================================
KNOWN LIMITATIONS:

- If the text string you set is too long (> 20 chars), it will be truncated.
  Try to keep it short: as in, one or two words, especially when using the
  WhiteLarge style, in order to avoid truncation
- The styling of the text is not currently customizable but based on the
  indicator style

===========================================================================
SAMPLE USAGE:

Add the following code to a viewDidLoad:
	DEJOwareActivityIndicatorView *activityIndicatorView = [[DEJOwareActivityIndicatorView alloc]
		initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray
		text:NSLocalizedString(@"Searching",@"Searching")
		superview:self.view];
Trigger the animation:
	[activityIndicatorView startAnimating];

===========================================================================
PACKAGING LIST

DEJOwareActivityIndicatorView
The custom class that emulates/enhances the UIActivityIndicatorView class.

ActivityIndicatorAppDelegate
Delegate for a sample application, presents the main view at launch time.

ActivityIndicatorViewController
A UIViewController subclass that manages the main/super view.

===========================================================================
VERSION: 2.0

uicustomactivityindicatorview's People

Contributors

dejo avatar

Stargazers

Kent Wong avatar  avatar Elango avatar Lucas Zhang avatar iamdaiyuan avatar

Watchers

 avatar

uicustomactivityindicatorview's Issues

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.