Permalink
Browse files

Restructured physical folders to clearly delineate the UAModalPanel f…

…iles.
  • Loading branch information...
coneybeare committed Jan 25, 2012
1 parent 72920b8 commit 64eb4a9baf23b38aa989b444e59aff858b4fd1b9
@@ -1,19 +0,0 @@
-//
-// UAAppDelegate.h
-// UAModalPanel
-//
-// Created by Matt Coneybeare on 1/8/12.
-// Copyright (c) 2012 Urban Apps. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@class UAViewController;
-
-@interface UAAppDelegate : UIResponder <UIApplicationDelegate>
-
-@property (strong, nonatomic) UIWindow *window;
-
-@property (strong, nonatomic) UAViewController *viewController;
-
-@end
@@ -1,78 +0,0 @@
-//
-// UAAppDelegate.m
-// UAModalPanel
-//
-// Created by Matt Coneybeare on 1/8/12.
-// Copyright (c) 2012 Urban Apps. All rights reserved.
-//
-
-#import "UAAppDelegate.h"
-
-#import "UAViewController.h"
-
-@implementation UAAppDelegate
-
-@synthesize window = _window;
-@synthesize viewController = _viewController;
-
-- (void)dealloc
-{
- [_window release];
- [_viewController release];
- [super dealloc];
-}
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
-{
- self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
- // Override point for customization after application launch.
- if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
- self.viewController = [[[UAViewController alloc] initWithNibName:@"UAViewController_iPhone" bundle:nil] autorelease];
- } else {
- self.viewController = [[[UAViewController alloc] initWithNibName:@"UAViewController_iPad" bundle:nil] autorelease];
- }
- self.window.rootViewController = self.viewController;
- [self.window makeKeyAndVisible];
- return YES;
-}
-
-- (void)applicationWillResignActive:(UIApplication *)application
-{
- /*
- Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
- Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
- */
-}
-
-- (void)applicationDidEnterBackground:(UIApplication *)application
-{
- /*
- Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
- If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
- */
-}
-
-- (void)applicationWillEnterForeground:(UIApplication *)application
-{
- /*
- Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
- */
-}
-
-- (void)applicationDidBecomeActive:(UIApplication *)application
-{
- /*
- Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
- */
-}
-
-- (void)applicationWillTerminate:(UIApplication *)application
-{
- /*
- Called when the application is about to terminate.
- Save data if appropriate.
- See also applicationDidEnterBackground:.
- */
-}
-
-@end
@@ -1,17 +0,0 @@
-//
-// UAModalExampleView.h
-// UAModalPanel
-//
-// Created by Matt Coneybeare on 1/8/12.
-// Copyright (c) 2012 Urban Apps. All rights reserved.
-//
-
-#import "UATitledModalPanel.h"
-
-@interface UAExampleModalPanel : UATitledModalPanel <UITableViewDataSource> {
- UIView *v;
-}
-
-- (id)initWithFrame:(CGRect)frame title:(NSString *)title;
-
-@end
@@ -1,130 +0,0 @@
-//
-// UAModalExampleView.m
-// UAModalPanel
-//
-// Created by Matt Coneybeare on 1/8/12.
-// Copyright (c) 2012 Urban Apps. All rights reserved.
-//
-
-#import "UAExampleModalPanel.h"
-
-#define BLACK_BAR_COMPONENTS { 0.22, 0.22, 0.22, 1.0, 0.07, 0.07, 0.07, 1.0 }
-
-@implementation UAExampleModalPanel
-
-
-- (id)initWithFrame:(CGRect)frame title:(NSString *)title {
- if ((self = [super initWithFrame:frame])) {
-
- CGFloat colors[8] = BLACK_BAR_COMPONENTS;
- [self.titleBar setColorComponents:colors];
- self.headerLabel.text = title;
-
-
- ////////////////////////////////////
- // RANDOMLY CUSTOMIZE IT
- ////////////////////////////////////
- // Show the defaults mostly, but once in awhile show a completely random funky one
- if (arc4random() % 4 == 0) {
- // Funky time.
- UADebugLog(@"Showing a randomized panel for modalPanel: %@", self);
-
- // Margin between edge of container frame and panel. Default = 20.0
- self.outerMargin = ((arc4random() % 4) + 1) * 20.0f;
-
- // Margin between edge of panel and the content area. Default = 20.0
- self.innerMargin = ((arc4random() % 4) + 1) * 10.0f;
-
- // Border color of the panel. Default = [UIColor whiteColor]
- self.borderColor = [UIColor colorWithRed:(arc4random() % 2) green:(arc4random() % 2) blue:(arc4random() % 2) alpha:1.0];
-
- // Border width of the panel. Default = 1.5f;
- self.borderWidth = ((arc4random() % 21)) * 0.5f;
-
- // Corner radius of the panel. Default = 4.0f
- self.cornerRadius = (arc4random() % 21);
-
- // Color of the panel itself. Default = [UIColor colorWithWhite:0.0 alpha:0.8]
- self.contentColor = [UIColor colorWithRed:(arc4random() % 2) green:(arc4random() % 2) blue:(arc4random() % 2) alpha:1.0];
-
- // Shows the bounce animation. Default = YES
- self.shouldBounce = (arc4random() % 2);
-
- // Height of the title view. Default = 40.0f
- [self setTitleBarHeight:((arc4random() % 5) + 2) * 20.0f];
-
- // The background color gradient of the title
- CGFloat colors[8] = {
- (arc4random() % 2), (arc4random() % 2), (arc4random() % 2), 1,
- (arc4random() % 2), (arc4random() % 2), (arc4random() % 2), 1
- };
- [[self titleBar] setColorComponents:colors];
-
- // The gradient style (Linear, linear reversed, radial, radial reversed, center highlight). Default = UAGradientBackgroundStyleLinear
- [[self titleBar] setGradientStyle:(arc4random() % 5)];
-
- // The line mode of the gradient view (top, bottom, both, none). Top is a white line, bottom is a black line.
- [[self titleBar] setLineMode: pow(2, (arc4random() % 3))];
-
- // The noise layer opacity. Default = 0.4
- [[self titleBar] setNoiseOpacity:(((arc4random() % 10) + 1) * 0.1)];
-
- // The header label, a UILabel with the same frame as the titleBar
- [self headerLabel].font = [UIFont boldSystemFontOfSize:floor(self.titleBarHeight / 2.0)];
- }
-
-
- //////////////////////////////////////
- // SETUP RANDOM CONTENT
- //////////////////////////////////////
- UIWebView *wv = [[[UIWebView alloc] initWithFrame:CGRectZero] autorelease];
- [wv loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://urbanapps.com/product_list"]]];
-
- UITableView *tv = [[[UITableView alloc] initWithFrame:CGRectZero] autorelease];
- [tv setDataSource:self];
-
- UIImageView *iv = [[[UIImageView alloc] initWithFrame:CGRectZero] autorelease];
- [iv setImage:[UIImage imageNamed:@"UrbanApps.png"]];
- [iv setContentMode:UIViewContentModeScaleAspectFit];
-
- NSArray *contentArray = [NSArray arrayWithObjects:wv, tv, iv, nil];
-
- int i = arc4random() % 3;
- v = [[contentArray objectAtIndex:i] retain];
- [self.contentView addSubview:v];
-
- }
- return self;
-}
-
-- (void)dealloc {
- [v release];
- [super dealloc];
-}
-
-- (void)layoutSubviews {
- [super layoutSubviews];
-
- [v setFrame:self.contentView.bounds];
-}
-
-#pragma mark - TableView
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- return 100;
-}
-
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-
- NSString *cellIdentifier = @"UAModalPanelCell";
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
- if (cell == nil) {
- cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier] autorelease];
- }
-
- [cell.textLabel setText:[NSString stringWithFormat:@"Row %d", indexPath.row]];
-
- return cell;
-}
-
-
-@end
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
- <data>
- <int key="IBDocument.SystemTarget">1280</int>
- <string key="IBDocument.SystemVersion">11C25</string>
- <string key="IBDocument.InterfaceBuilderVersion">1919</string>
- <string key="IBDocument.AppKitVersion">1138.11</string>
- <string key="IBDocument.HIToolboxVersion">566.00</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
- <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">916</string>
- </object>
- <array key="IBDocument.IntegratedClassDependencies">
- <string>IBProxyObject</string>
- <string>IBUIView</string>
- </array>
- <array key="IBDocument.PluginDependencies">
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- </array>
- <object class="NSMutableDictionary" key="IBDocument.Metadata">
- <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
- <integer value="1" key="NS.object.0"/>
- </object>
- <array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
- <object class="IBProxyObject" id="372490531">
- <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- <object class="IBProxyObject" id="975951072">
- <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- <object class="IBUIView" id="191373211">
- <reference key="NSNextResponder"/>
- <int key="NSvFlags">274</int>
- <string key="NSFrame">{{0, 20}, {320, 460}}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
- <object class="NSColor" key="IBUIBackgroundColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- <object class="NSColorSpace" key="NSCustomColorSpace">
- <int key="NSID">2</int>
- </object>
- </object>
- <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- </array>
- <object class="IBObjectContainer" key="IBDocument.Objects">
- <array class="NSMutableArray" key="connectionRecords"/>
- <object class="IBMutableOrderedSet" key="objectRecords">
- <array key="orderedObjects">
- <object class="IBObjectRecord">
- <int key="objectID">0</int>
- <array key="object" id="0"/>
- <reference key="children" ref="1000"/>
- <nil key="parent"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">1</int>
- <reference key="object" ref="191373211"/>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-1</int>
- <reference key="object" ref="372490531"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">File's Owner</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-2</int>
- <reference key="object" ref="975951072"/>
- <reference key="parent" ref="0"/>
- </object>
- </array>
- </object>
- <dictionary class="NSMutableDictionary" key="flattenedProperties">
- <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="-2.CustomClassName">UIResponder</string>
- <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
- <nil key="activeLocalization"/>
- <dictionary class="NSMutableDictionary" key="localizations"/>
- <nil key="sourceID"/>
- <int key="maxID">2</int>
- </object>
- <object class="IBClassDescriber" key="IBDocument.Classes"/>
- <int key="IBDocument.localizationMode">0</int>
- <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
- <int key="IBDocument.defaultPropertyAccessControl">3</int>
- <string key="IBCocoaTouchPluginVersion">916</string>
- </data>
-</archive>
@@ -1,46 +0,0 @@
-//
-// UAGradientBackground.h
-// UAModalPanel
-//
-// Created by Matt Coneybeare on 1/8/12.
-// Copyright (c) 2012 Urban Apps. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-typedef enum {
- UAGradientBackgroundStyleRadial = 0,
- UAGradientBackgroundStyleRadialReversed,
- UAGradientBackgroundStyleLinear,
- UAGradientBackgroundStyleLinearReversed,
- UAGradientBackgroundStyleCenterHighlight,
-} UAGradientBackgroundStyle;
-
-typedef enum {
- UAGradientLineModeNone = 0,
- UAGradientLineModeTop = 2,
- UAGradientLineModeBottom = 4,
- UAGradientLineModeTopAndBottom = 8
-} UAGradientLineMode;
-
-@interface UAGradientBackground : UIView {
- UAGradientBackgroundStyle gradientStyle;
- UAGradientLineMode lineMode;
- CGFloat *colorComponents;
-}
-
-@property (nonatomic, assign) UAGradientBackgroundStyle gradientStyle;
-@property (nonatomic, assign) UAGradientLineMode lineMode;
-
-- (id)initWithFrame:(CGRect)frame style:(UAGradientBackgroundStyle)aStyle color:(CGFloat *)components lineMode:(UAGradientLineMode)lineModes;
-- (id)initWithFrame:(CGRect)frame color:(CGFloat *)components;
-- (id)initWithFrame:(CGRect)frame style:(UAGradientBackgroundStyle)aStyle;
-- (id)initWithFrame:(CGRect)frame;
-
-- (void)setColorComponents:(CGFloat *)components;
-
-+ (id)gradientWithFrame:(CGRect)frame style:(UAGradientBackgroundStyle)aStyle color:(CGFloat *)components lineMode:(UAGradientLineMode)lineModes;
-+ (id)gradientWithFrame:(CGRect)frame color:(CGFloat *)components;
-+ (id)gradientWithFrame:(CGRect)frame style:(UAGradientBackgroundStyle)aStyle;
-+ (id)gradientWithFrame:(CGRect)frame;
-@end
Oops, something went wrong.

0 comments on commit 64eb4a9

Please sign in to comment.