ALPopupView
ALPopupView Class Reference

List of all members.

Public Member Functions

(id) - initWithFrame:withParentView:
(void) - show
(void) - hide
(void) - showWithAnimation:withDuration:
(void) - hideWithAnimation:withDuration:
(void) - buildLayout

Properties

float transitionDuration
int borderWidth
int cornerRadius
float borderAlpha
UIColor * borderColor
UIColor * outsideBackcolor
float outsideAlpha
BOOL closeOnTapOutside
UIView * titleBarView
UIColor * titleBarBackColor
UILabel * titleBarLabel
NSString * titleBarText
UIColor * titleBarTextColor
UIFont * titleBarFont
float titleBarHeight
BOOL titleBarCloseButtonVisible
BOOL titleBarVisible
UIView * buttonsView
float buttonsViewHeight
UIColor * buttonsViewBackColor
float buttonHeight
float buttonWidth
float buttonsPadding
ButtonAlignment buttonsAlignment
UIFont * buttonFont
NSMutableArray * buttonsTitleList
NSMutableArray * buttonsList
BOOL buttonsViewVisible
UIView * contentView
id< ALPopupViewDelegatedelegate

Member Function Documentation

- (void) buildLayout

This methos must be called each time you finish customizing the popup attributes. Every time you make a change (colors - font - seizes - change screen orientation - etc ..) you need to call this method to reload the popup layout before showing

- (void) hide

This method hides the popup with the setted animation duration (default 0.3 seconds)

- (void) hideWithAnimation: (BOOL)  animation
withDuration: (float)  duration 

Hide the popup.

Parameters:
[in]animationif YES, the popup is hided with the animation
[in]durationif animation is YES, this parameter sets the animation duration (in seconds)
- (id) initWithFrame: (CGRect)  frame
withParentView: (UIView*)  parent 

Init the popup view.

Parameters:
[in]frameis the entire frame of the popup (borders included)
[in]parentis the superView in which this popup will be added
- (void) show

This method shows the popup with the setted animation duration (default 0.3 seconds)

- (void) showWithAnimation: (BOOL)  animation
withDuration: (float)  duration 

Show the popup.

Parameters:
[in]animationif YES, the popup is showed with the animation
[in]durationif animation is YES, this parameter sets the animation duration (in seconds)

Property Documentation

- (float) borderAlpha [read, write, assign]

Alpha value of the border (default = 0.5)

- (UIColor*) borderColor [read, write, retain]

The border color (default [UIColor colorWithRed:0.3 green:0.3 blue:0.3 alpha:0.8] )

- (int) borderWidth [read, write, assign]

The width of the external border of the popup (default 8)

- (UIFont*) buttonFont [read, write, retain]

The font of a single button added to the buttons view (default [UIFont boldSystemFontOfSize:11])

- (float) buttonHeight [read, write, assign]

The height of a single button added to the buttons view (default 36)

- (ButtonAlignment) buttonsAlignment [read, write, assign]

The alignment of the buttons inside the button view. Possible values: ALPopupViewButtonsAlignmentLeft, ALPopupViewButtonsAlignmentRight, ALPopupViewButtonsAlignmentCenter (default)

- (NSMutableArray*) buttonsList [read, assign]

This is a reference of the buttons added inside the button view. If you want to customize every single button, you can retrieve each ref from this array

- (float) buttonsPadding [read, write, assign]

The pixel distance between the buttons and the internal border of popup

- (NSMutableArray*) buttonsTitleList [read, write, retain]

This is an NSArray* o NSString* . The user can set this array of strings and for each string added, a button will be shown inside the buttons view. The buttons are added in the same order of the strings inside this array

- (UIView*) buttonsView [read, assign]

A read only reference of the buttons view on the bottom of the popup

- (UIColor*) buttonsViewBackColor [read, write, retain]

The background color of the buttons view (default [UIColor whiteColor])

- (float) buttonsViewHeight [read, write, assign]

It's possibile to set a custom height for buttons view (default height is 12% of the entire popup (border excluded) )

- (BOOL) buttonsViewVisible [read, write, assign]

If YES, the buttons bar is showed (default NO)

- (float) buttonWidth [read, write, assign]

The width of a single button added to the buttons view (default 105)

- (BOOL) closeOnTapOutside [read, write, assign]

If YES, the popup will close when the user tap outside of it (default NO)

- (UIView*) contentView [read, assign]

A read only reference of the content view. The content view, is the entire view inside the popup, excluding borders, title view and buttons view

- (int) cornerRadius [read, write, assign]

The corners radius of the external border (default 10)

- (id<ALPopupViewDelegate>) delegate [read, write, assign]

The delegate that will receive the events of this component

- (float) outsideAlpha [read, write, assign]

The alpha value of the outsite view (default 1.0)

- (UIColor*) outsideBackcolor [read, write, retain]

When the popup is displayed, a view is added between the superView and the popup. It's possible to set the background color of this view (default [UIColor clearColor] )

- (UIColor*) titleBarBackColor [read, write, retain]

The background color of the title bar (default [UIColor colorWithWhite:0.192 alpha:1.000])

- (BOOL) titleBarCloseButtonVisible [read, write, assign]

If YES, the title view will show its default close button

- (UIFont*) titleBarFont [read, write, retain]

The font of the title bar (default [UIFont boldSystemFontOfSize:12])

- (float) titleBarHeight [read, write, assign]

It's possibile to set a custom height for title bar view (default height is 7% of the entire popup (boreder excluded) )

- (UILabel*) titleBarLabel [read, assign]

If the title view is displayed, a label is added to the title view (default: its frame is the same of title bar view frame)

- (NSString*) titleBarText [read, write, retain]

The text displayed in the title bar (default "Title")

- (UIColor*) titleBarTextColor [read, write, retain]

The text color of the title bar (default [UIColor colorWithRed:0.922 green:0.933 blue:0.961 alpha:1])

- (UIView*) titleBarView [read, assign]

A read only reference of the title view situated on the top of the popup

- (BOOL) titleBarVisible [read, write, assign]

If YES, the title bar is showed (default YES)

- (float) transitionDuration [read, write, assign]

The length of the show and hide animation (default 0.3)