統計情報(30日間)


最新情報をツイート


人気の投稿

カスタム AlertViewライブラリ

このエントリーをはてなブックマークに追加



ビルドして実行してみた。












デザインは結構いい。ただ使いどころは難しいかもしれない。背景のボーダーはON/OFFが可能・点線枠のアニメーションを付けることができる。

また左上の画像は差し替えられる。



APIはとてもシンプルなのですぐに使える。UIAlertViewのサブクラスになっている。
typedef enum {
    GRAlertViewStyleNone,
    GRAlertStyleAlert,
    GRAlertStyleSuccess,
    GRAlertStyleWarning,
    GRAlertStyleInfo,
} GRAlertViewStyle;

typedef enum {
    GRAlertAnimationNone,
    GRAlertAnimationLines,
    GRAlertAnimationBorder,
} GRAlertAnimation;

@interface GRAlertView : UIAlertView

@property (assign) GRAlertViewStyle style;
@property (assign) GRAlertAnimation animation;

- (void)setTopColor:(UIColor*)tc middleColor:(UIColor*)mc bottomColor:(UIColor*)bc lineColor:(UIColor*)lc;
- (void)setFontName:(NSString*)fn fontColor:(UIColor*)fc fontShadowColor:(UIColor*)fsc;
- (void)setImage:(NSString*)imageName;

Leave a Reply