Permalink
Browse files

The very basic display capabilities

  • Loading branch information...
1 parent 5f1556d commit abb8524a4754834cc291524f5fcf9988a935d984 Alex Barinov committed Jul 24, 2012
View
@@ -13,3 +13,4 @@ build/*
xcuserdata
profile
*.moved-aside
+.DS_Store
View
@@ -1,2 +0,0 @@
-UIBubbleTableView
-=================
Oops, something went wrong.
@@ -0,0 +1,19 @@
+//
+// AppDelegate.h
+//
+// Created by Alex Barinov
+// StexGroup, LLC
+// http://www.stexgroup.com
+//
+
+#import <UIKit/UIKit.h>
+
+@class ViewController;
+
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@property (strong, nonatomic) ViewController *viewController;
+
+@end
@@ -0,0 +1,61 @@
+//
+// AppDelegate.m
+//
+// Created by Alex Barinov
+// StexGroup, LLC
+// http://www.stexgroup.com
+//
+
+#import "AppDelegate.h"
+
+#import "ViewController.h"
+
+@implementation AppDelegate
+
+@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];
+ self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController" 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
@@ -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>com.stexgroup.${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 'UIBubbleTableViewExample' target in the 'UIBubbleTableViewExample' 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
@@ -0,0 +1,21 @@
+//
+// ViewController.h
+//
+// Created by Alex Barinov
+// StexGroup, LLC
+// http://www.stexgroup.com
+//
+
+#import <UIKit/UIKit.h>
+#import "UIBubbleTableViewDataSource.h"
+
+@class UIBubbleTableView;
+
+@interface ViewController : UIViewController <UIBubbleTableViewDataSource>
+{
+ IBOutlet UIBubbleTableView *bubbleTable;
+
+ NSMutableArray *bubbleData;
+}
+
+@end
@@ -0,0 +1,51 @@
+//
+// ViewController.m
+//
+// Created by Alex Barinov
+// StexGroup, LLC
+// http://www.stexgroup.com
+//
+
+#import "ViewController.h"
+#import "UIBubbleTableView.h"
+#import "UIBubbleTableViewDataSource.h"
+#import "NSBubbleData.h"
+
+@implementation ViewController
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+
+ bubbleTable.bubbleDataSource = self;
+
+ bubbleData = [[NSMutableArray alloc] initWithObjects:
+ [[NSBubbleData alloc] initWithText:@"Hi Kate. This is Alex." andDate:[NSDate dateWithTimeIntervalSinceNow:-300] andType:BubbleTypeMine],
+ [[NSBubbleData alloc] initWithText:@"Hi Alex. How you doing today? Wanna take a long walk? The weather is perfect!" andDate:[NSDate dateWithTimeIntervalSinceNow:-280] andType:BubbleTypeSomeoneElse],
+ [[NSBubbleData alloc] initWithText:@"Yes, sure. See you at 8." andDate:[NSDate dateWithTimeIntervalSinceNow:0] andType:BubbleTypeMine],
+ nil];
+}
+
+- (void)viewDidUnload
+{
+ [super viewDidUnload];
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
+}
+
+#pragma mark - UIBubbleTableViewDataSource implementation
+
+- (NSInteger)rowsForBubbleTable:(UIBubbleTableView *)tableView
+{
+ return [bubbleData count];
+}
+
+- (NSBubbleData *)bubbleTableView:(UIBubbleTableView *)tableView dataForRow:(NSInteger)row
+{
+ return [bubbleData objectAtIndex:row];
+}
+
+@end
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
Oops, something went wrong.

0 comments on commit abb8524

Please sign in to comment.