Permalink
Browse files

Initial code commit

  • Loading branch information...
1 parent 752723c commit cc20fe76a137135bf77176fbe38539d5df5ee1dd @khanlou khanlou committed Oct 19, 2012

Large diffs are not rendered by default.

Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -0,0 +1,19 @@
+//
+// FTWAppDelegate.h
+// FTWButton
+//
+// Created by Soroush Khanlou on 10/12/12.
+// Copyright (c) 2012 FTW. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class FTWViewController;
+
+@interface FTWAppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@property (strong, nonatomic) FTWViewController *viewController;
+
+@end
View
@@ -0,0 +1,26 @@
+//
+// FTWAppDelegate.m
+// FTWButton
+//
+// Created by Soroush Khanlou on 10/12/12.
+// Copyright (c) 2012 FTW. All rights reserved.
+//
+
+#import "FTWAppDelegate.h"
+
+#import "FTWViewController.h"
+
+@implementation FTWAppDelegate
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+ // Override point for customization after application launch.
+ self.viewController = [[FTWViewController alloc] initWithNibName:@"FTWViewController" bundle:nil];
+ self.window.rootViewController = self.viewController;
+ [self.window makeKeyAndVisible];
+ return YES;
+}
+
+
+@end
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>co.ftw.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+</dict>
+</plist>
@@ -0,0 +1,14 @@
+//
+// Prefix header for all source files of the 'FTWButton' target in the 'FTWButton' project
+//
+
+#import <Availability.h>
+
+#ifndef __IPHONE_4_0
+#warning "This project uses features only available in iOS SDK 4.0 and later."
+#endif
+
+#ifdef __OBJC__
+ #import <UIKit/UIKit.h>
+ #import <Foundation/Foundation.h>
+#endif
View
@@ -0,0 +1,108 @@
+//
+// FTWAnimatableGradientButton.h
+// FTW
+//
+// Created by Soroush Khanlou on 1/26/12.
+// Copyright (c) 2012 FTW. All rights reserved.
+//
+
+//todo
+
+//override setframe
+
+#import <UIKit/UIKit.h>
+#import <QuartzCore/QuartzCore.h>
+
+typedef enum {
+ FTWAnimatableGradientButtonStyleDelete = 0,
+ FTWAnimatableGradientButtonStyleCancel,
+ FTWAnimatableGradientButtonStyleDisabled,
+ FTWAnimatableGradientButtonStyleBlue
+} FTWAnimatableGradientButtonStyle;
+
+@interface FTWButton : UIControl
+
+@property (nonatomic, assign) NSTextAlignment textAlignment;
+
+//a few default styles
+- (void) addDisabledStyleForState:(UIControlState)state;
+- (void) addDeleteStyleForState:(UIControlState)state;
+- (void) addGrayStyleForState:(UIControlState)state;
+- (void) addLightBlueStyleForState:(UIControlState)state;
+- (void) addBlueStyleForState:(UIControlState)state;
+- (void) addYellowStyleForState:(UIControlState)state;
+- (void) addBlackStyleForState:(UIControlState)state;
+
+
+
+- (void) setFrame:(CGRect)frame forControlState:(UIControlState)controlState;
+- (CGRect) frameForControlState:(UIControlState)controlState;
+
+- (void) setSelected:(BOOL)newSelected animated:(BOOL)animated;
+- (void) setHighlighted:(BOOL)highlighted animated:(BOOL)animated;
+
+//backrounds
+- (void) setBackgroundColor:(UIColor*)color forControlState:(UIControlState)controlState;
+- (UIColor*) backgroundColorForControlState:(UIControlState)controlState;
+
+- (void) setColors:(NSArray*)colors forControlState:(UIControlState)controlState;
+- (NSArray*) colorsForControlState:(UIControlState)controlState;
+
+//borders
+- (void) setBorderWidth:(CGFloat)borderWidth forControlState:(UIControlState)controlState;
+- (CGFloat) borderWidthForControlState:(UIControlState)controlState;
+
+- (void) setBorderColor:(UIColor*)borderColor forControlState:(UIControlState)controlState;
+- (UIColor*) borderColorForControlState:(UIControlState)controlState;
+
+- (void) setBorderColors:(NSArray*)borderColor forControlState:(UIControlState)controlState;
+- (NSArray*) borderColorsForControlState:(UIControlState)controlState;
+
+- (void) setCornerRadius:(CGFloat)cornerRadius forControlState:(UIControlState)controlState;
+- (CGFloat) cornerRadiusForControlState:(UIControlState)controlState;
+
+- (void) setIcon:(UIImage*)icon forControlState:(UIControlState)controlState;
+- (UIImage*) iconForControlState:(UIControlState)controlState;
+
+//text
+- (void) setText:(NSString*)text forControlState:(UIControlState)controlState;
+- (NSString*) textForControlState:(UIControlState)controlState;
+
+- (void) setTextColor:(UIColor*)textColor forControlState:(UIControlState)controlState;
+- (UIColor*) textColorForControlState:(UIControlState)controlState;
+
+- (void) setTextShadowColor:(UIColor*)textShadowColor forControlState:(UIControlState)controlState;
+- (UIColor*) textShadowColorForControlState:(UIControlState)controlState;
+
+- (void) setTextShadowOffset:(CGSize)textShadowOffset forControlState:(UIControlState)controlState;
+- (CGSize) textShadowOffsetForControlState:(UIControlState)controlState;
+
+- (void) setFont:(UIFont *)font;
+
+
+//shadow
+- (void) setShadowColor:(UIColor*)shadowColor forControlState:(UIControlState)controlState;
+- (UIColor*) shadowColorForControlState:(UIControlState)controlState;
+
+- (void) setShadowOffset:(CGSize)shadowOffset forControlState:(UIControlState)controlState;
+- (CGSize) shadowOffsetForControlState:(UIControlState)controlState;
+
+- (void) setShadowRadius:(CGFloat)shadowRadius forControlState:(UIControlState)controlState;
+- (CGFloat) shadowRadiusForControlState:(UIControlState)controlState;
+
+- (void) setShadowOpacity:(CGFloat)shadowOpacity forControlState:(UIControlState)controlState;
+- (CGFloat) shadowOpacityForControlState:(UIControlState)controlState;
+
+
+//inner shadow
+- (void) setInnerShadowColor:(UIColor*)shadowColor forControlState:(UIControlState)controlState;
+- (UIColor*) innerShadowColorForControlState:(UIControlState)controlState;
+
+- (void) setInnerShadowOffset:(CGSize)shadowOffset forControlState:(UIControlState)controlState;
+- (CGSize) innerShadowOffsetForControlState:(UIControlState)controlState;
+
+- (void) setInnerShadowRadius:(CGFloat)shadowRadius forControlState:(UIControlState)controlState;
+- (CGFloat) innerShadowRadiusForControlState:(UIControlState)controlState;
+
+
+@end
Oops, something went wrong.

0 comments on commit cc20fe7

Please sign in to comment.