Skip to content
This repository was archived by the owner on Mar 9, 2018. It is now read-only.

Commit abb8524

Browse files
Alex BarinovAlex Barinov
authored andcommitted
The very basic display capabilities
1 parent 5f1556d commit abb8524

24 files changed

+1445
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ build/*
1313
xcuserdata
1414
profile
1515
*.moved-aside
16+
.DS_Store

README.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

example/UIBubbleTableViewExample.xcodeproj/project.pbxproj

Lines changed: 334 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// AppDelegate.h
3+
//
4+
// Created by Alex Barinov
5+
// StexGroup, LLC
6+
// http://www.stexgroup.com
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
@class ViewController;
12+
13+
@interface AppDelegate : UIResponder <UIApplicationDelegate>
14+
15+
@property (strong, nonatomic) UIWindow *window;
16+
17+
@property (strong, nonatomic) ViewController *viewController;
18+
19+
@end
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
//
2+
// AppDelegate.m
3+
//
4+
// Created by Alex Barinov
5+
// StexGroup, LLC
6+
// http://www.stexgroup.com
7+
//
8+
9+
#import "AppDelegate.h"
10+
11+
#import "ViewController.h"
12+
13+
@implementation AppDelegate
14+
15+
@synthesize window = _window;
16+
@synthesize viewController = _viewController;
17+
18+
- (void)dealloc
19+
{
20+
[_window release];
21+
[_viewController release];
22+
[super dealloc];
23+
}
24+
25+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
26+
{
27+
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
28+
self.viewController = [[[ViewController alloc] initWithNibName:@"ViewController" bundle:nil] autorelease];
29+
self.window.rootViewController = self.viewController;
30+
[self.window makeKeyAndVisible];
31+
return YES;
32+
}
33+
34+
- (void)applicationWillResignActive:(UIApplication *)application
35+
{
36+
// 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.
37+
// 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.
38+
}
39+
40+
- (void)applicationDidEnterBackground:(UIApplication *)application
41+
{
42+
// 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.
43+
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
44+
}
45+
46+
- (void)applicationWillEnterForeground:(UIApplication *)application
47+
{
48+
// 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.
49+
}
50+
51+
- (void)applicationDidBecomeActive:(UIApplication *)application
52+
{
53+
// 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.
54+
}
55+
56+
- (void)applicationWillTerminate:(UIApplication *)application
57+
{
58+
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
59+
}
60+
61+
@end
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>en</string>
7+
<key>CFBundleDisplayName</key>
8+
<string>${PRODUCT_NAME}</string>
9+
<key>CFBundleExecutable</key>
10+
<string>${EXECUTABLE_NAME}</string>
11+
<key>CFBundleIdentifier</key>
12+
<string>com.stexgroup.${PRODUCT_NAME:rfc1034identifier}</string>
13+
<key>CFBundleInfoDictionaryVersion</key>
14+
<string>6.0</string>
15+
<key>CFBundleName</key>
16+
<string>${PRODUCT_NAME}</string>
17+
<key>CFBundlePackageType</key>
18+
<string>APPL</string>
19+
<key>CFBundleShortVersionString</key>
20+
<string>1.0</string>
21+
<key>CFBundleSignature</key>
22+
<string>????</string>
23+
<key>CFBundleVersion</key>
24+
<string>1.0</string>
25+
<key>LSRequiresIPhoneOS</key>
26+
<true/>
27+
<key>UIRequiredDeviceCapabilities</key>
28+
<array>
29+
<string>armv7</string>
30+
</array>
31+
<key>UISupportedInterfaceOrientations</key>
32+
<array>
33+
<string>UIInterfaceOrientationPortrait</string>
34+
<string>UIInterfaceOrientationLandscapeLeft</string>
35+
<string>UIInterfaceOrientationLandscapeRight</string>
36+
</array>
37+
</dict>
38+
</plist>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//
2+
// Prefix header for all source files of the 'UIBubbleTableViewExample' target in the 'UIBubbleTableViewExample' project
3+
//
4+
5+
#import <Availability.h>
6+
7+
#ifndef __IPHONE_4_0
8+
#warning "This project uses features only available in iOS SDK 4.0 and later."
9+
#endif
10+
11+
#ifdef __OBJC__
12+
#import <UIKit/UIKit.h>
13+
#import <Foundation/Foundation.h>
14+
#endif
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// ViewController.h
3+
//
4+
// Created by Alex Barinov
5+
// StexGroup, LLC
6+
// http://www.stexgroup.com
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
#import "UIBubbleTableViewDataSource.h"
11+
12+
@class UIBubbleTableView;
13+
14+
@interface ViewController : UIViewController <UIBubbleTableViewDataSource>
15+
{
16+
IBOutlet UIBubbleTableView *bubbleTable;
17+
18+
NSMutableArray *bubbleData;
19+
}
20+
21+
@end
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
//
2+
// ViewController.m
3+
//
4+
// Created by Alex Barinov
5+
// StexGroup, LLC
6+
// http://www.stexgroup.com
7+
//
8+
9+
#import "ViewController.h"
10+
#import "UIBubbleTableView.h"
11+
#import "UIBubbleTableViewDataSource.h"
12+
#import "NSBubbleData.h"
13+
14+
@implementation ViewController
15+
16+
- (void)viewDidLoad
17+
{
18+
[super viewDidLoad];
19+
20+
bubbleTable.bubbleDataSource = self;
21+
22+
bubbleData = [[NSMutableArray alloc] initWithObjects:
23+
[[NSBubbleData alloc] initWithText:@"Hi Kate. This is Alex." andDate:[NSDate dateWithTimeIntervalSinceNow:-300] andType:BubbleTypeMine],
24+
[[NSBubbleData alloc] initWithText:@"Hi Alex. How you doing today? Wanna take a long walk? The weather is perfect!" andDate:[NSDate dateWithTimeIntervalSinceNow:-280] andType:BubbleTypeSomeoneElse],
25+
[[NSBubbleData alloc] initWithText:@"Yes, sure. See you at 8." andDate:[NSDate dateWithTimeIntervalSinceNow:0] andType:BubbleTypeMine],
26+
nil];
27+
}
28+
29+
- (void)viewDidUnload
30+
{
31+
[super viewDidUnload];
32+
}
33+
34+
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
35+
{
36+
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
37+
}
38+
39+
#pragma mark - UIBubbleTableViewDataSource implementation
40+
41+
- (NSInteger)rowsForBubbleTable:(UIBubbleTableView *)tableView
42+
{
43+
return [bubbleData count];
44+
}
45+
46+
- (NSBubbleData *)bubbleTableView:(UIBubbleTableView *)tableView dataForRow:(NSInteger)row
47+
{
48+
return [bubbleData objectAtIndex:row];
49+
}
50+
51+
@end
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/* Localized versions of Info.plist keys */
2+

0 commit comments

Comments
 (0)