Skip to content
This repository has been archived by the owner on Jul 2, 2019. It is now read-only.

Commit

Permalink
Added demo project.
Browse files Browse the repository at this point in the history
  • Loading branch information
shayne committed Dec 14, 2009
1 parent 147d451 commit 15595e7
Show file tree
Hide file tree
Showing 9 changed files with 372 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.pbxuser
*.perspectivev3
Demo/build
15 changes: 15 additions & 0 deletions Demo/Classes/SSUnreadBubbleDemoAppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// AppDelegate.h
// SSUnreadBubbleDemo
//
// Created by Shayne Sweeney on 12/13/09.
// Copyright 2009. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface SSUnreadBubbleDemoAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window_;
}

@end
51 changes: 51 additions & 0 deletions Demo/Classes/SSUnreadBubbleDemoAppDelegate.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
//
// AppDelegate.m
// SSUnreadBubbleDemo
//
// Created by Shayne Sweeney on 12/13/09.
// Copyright 2009. All rights reserved.
//

#import "SSUnreadBubbleDemoAppDelegate.h"
#import "SSUnreadBubble.h"

@implementation SSUnreadBubbleDemoAppDelegate

- (void)applicationDidFinishLaunching:(UIApplication *)application {
window_ = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
window_.backgroundColor = [UIColor whiteColor];

UILabel *standardLabel = [[[UILabel alloc] initWithFrame:CGRectMake(0, 100, 320, 30)] autorelease];
standardLabel.text = @"Standard Bubble (Blueish - 12x12)";
standardLabel.textAlignment = UITextAlignmentCenter;
standardLabel.font = [UIFont systemFontOfSize:20];
[window_ addSubview:standardLabel];

SSUnreadBubble *standardBubble = [[[SSUnreadBubble alloc] init] autorelease];
standardBubble.center = CGPointMake(154, 150);
[window_ addSubview:standardBubble];

UILabel *customLabel = [[[UILabel alloc] initWithFrame:CGRectMake(0, 240, 320, 30)] autorelease];
customLabel.text = @"Custom Bubble (Ugly - 50x50)";
customLabel.textAlignment = UITextAlignmentCenter;
customLabel.font = [UIFont systemFontOfSize:20];
[window_ addSubview:customLabel];

SSUnreadBubble *customBubble = [[[SSUnreadBubble alloc] initWithFrame:CGRectMake(135, 275, 50, 50)] autorelease];
customBubble.radius = 50;
customBubble.borderWidth = 5;
customBubble.fillStartColor = [UIColor blueColor];
customBubble.fillEndColor = [UIColor yellowColor];
customBubble.borderStartColor = [UIColor greenColor];
customBubble.borderEndColor = [UIColor redColor];
[window_ addSubview:customBubble];

[window_ makeKeyAndVisible];
}

- (void)dealloc {
[window_ release];
[super dealloc];
}

@end
28 changes: 28 additions & 0 deletions Demo/SSUnreadBubbleDemo-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?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>English</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${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>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
</dict>
</plist>
249 changes: 249 additions & 0 deletions Demo/SSUnreadBubbleDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {

/* Begin PBXBuildFile section */
1D3623260D0F684500981E51 /* SSUnreadBubbleDemoAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* SSUnreadBubbleDemoAppDelegate.m */; };
1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
2653257910D608680066F063 /* SSUnreadBubble.m in Sources */ = {isa = PBXBuildFile; fileRef = 2653257710D608680066F063 /* SSUnreadBubble.m */; };
288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
1D3623240D0F684500981E51 /* SSUnreadBubbleDemoAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSUnreadBubbleDemoAppDelegate.h; sourceTree = "<group>"; };
1D3623250D0F684500981E51 /* SSUnreadBubbleDemoAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SSUnreadBubbleDemoAppDelegate.m; sourceTree = "<group>"; };
1D6058910D05DD3D006BFB54 /* SSUnreadBubbleDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SSUnreadBubbleDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
2653257710D608680066F063 /* SSUnreadBubble.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SSUnreadBubble.m; path = ../SSUnreadBubble/SSUnreadBubble.m; sourceTree = SOURCE_ROOT; };
2653257810D608680066F063 /* SSUnreadBubble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SSUnreadBubble.h; path = ../SSUnreadBubble/SSUnreadBubble.h; sourceTree = SOURCE_ROOT; };
288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
32CA4F630368D1EE00C91783 /* SSUnreadBubbleDemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SSUnreadBubbleDemo_Prefix.pch; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* SSUnreadBubbleDemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SSUnreadBubbleDemo-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
2653257610D608540066F063 /* SSUnreadBubble */,
1D3623240D0F684500981E51 /* SSUnreadBubbleDemoAppDelegate.h */,
1D3623250D0F684500981E51 /* SSUnreadBubbleDemoAppDelegate.m */,
);
path = Classes;
sourceTree = "<group>";
};
19C28FACFE9D520D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
1D6058910D05DD3D006BFB54 /* SSUnreadBubbleDemo.app */,
);
name = Products;
sourceTree = "<group>";
};
2653257610D608540066F063 /* SSUnreadBubble */ = {
isa = PBXGroup;
children = (
2653257710D608680066F063 /* SSUnreadBubble.m */,
2653257810D608680066F063 /* SSUnreadBubble.h */,
);
name = SSUnreadBubble;
sourceTree = "<group>";
};
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
isa = PBXGroup;
children = (
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
19C28FACFE9D520D11CA2CBB /* Products */,
);
name = CustomTemplate;
sourceTree = "<group>";
};
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
isa = PBXGroup;
children = (
32CA4F630368D1EE00C91783 /* SSUnreadBubbleDemo_Prefix.pch */,
29B97316FDCFA39411CA2CEA /* main.m */,
);
name = "Other Sources";
sourceTree = "<group>";
};
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
8D1107310486CEB800E47090 /* SSUnreadBubbleDemo-Info.plist */,
);
name = Resources;
sourceTree = "<group>";
};
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
1D30AB110D05D00D00671497 /* Foundation.framework */,
288765FC0DF74451002DB57D /* CoreGraphics.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
1D6058900D05DD3D006BFB54 /* SSUnreadBubbleDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "SSUnreadBubbleDemo" */;
buildPhases = (
1D60588D0D05DD3D006BFB54 /* Resources */,
1D60588E0D05DD3D006BFB54 /* Sources */,
1D60588F0D05DD3D006BFB54 /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = SSUnreadBubbleDemo;
productName = SSUnreadBubbleDemo;
productReference = 1D6058910D05DD3D006BFB54 /* SSUnreadBubbleDemo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SSUnreadBubbleDemo" */;
compatibilityVersion = "Xcode 3.2";
hasScannedForEncodings = 1;
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
projectDirPath = "";
projectRoot = "";
targets = (
1D6058900D05DD3D006BFB54 /* SSUnreadBubbleDemo */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
1D60588D0D05DD3D006BFB54 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
1D60588E0D05DD3D006BFB54 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1D60589B0D05DD56006BFB54 /* main.m in Sources */,
1D3623260D0F684500981E51 /* SSUnreadBubbleDemoAppDelegate.m in Sources */,
2653257910D608680066F063 /* SSUnreadBubble.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
1D6058940D05DD3E006BFB54 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = SSUnreadBubbleDemo_Prefix.pch;
INFOPLIST_FILE = "SSUnreadBubbleDemo-Info.plist";
PRODUCT_NAME = SSUnreadBubbleDemo;
};
name = Debug;
};
1D6058950D05DD3E006BFB54 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = SSUnreadBubbleDemo_Prefix.pch;
INFOPLIST_FILE = "SSUnreadBubbleDemo-Info.plist";
PRODUCT_NAME = SSUnreadBubbleDemo;
};
name = Release;
};
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = iphoneos3.1.2;
};
name = Debug;
};
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = iphoneos3.1.2;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "SSUnreadBubbleDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1D6058940D05DD3E006BFB54 /* Debug */,
1D6058950D05DD3E006BFB54 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SSUnreadBubbleDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4F08A954540054247B /* Debug */,
C01FCF5008A954540054247B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
}
8 changes: 8 additions & 0 deletions Demo/SSUnreadBubbleDemo_Prefix.pch
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// Prefix header for all source files of the 'SSUnreadBubbleDemo' target in the 'SSUnreadBubbleDemo' project
//

#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#endif
16 changes: 16 additions & 0 deletions Demo/main.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// main.m
// SSUnreadBubbleDemo
//
// Created by Shayne Sweeney on 12/13/09.
// Copyright 2009. All rights reserved.
//

#import <UIKit/UIKit.h>

int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, @"SSUnreadBubbleDemoAppDelegate");
[pool release];
return retVal;
}
2 changes: 1 addition & 1 deletion SSUnreadBubble.h → SSUnreadBubble/SSUnreadBubble.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SSUnreadBubble
//
// Created by Shayne Sweeney on 12/13/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
// Copyright 2009. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
2 changes: 1 addition & 1 deletion SSUnreadBubble.m → SSUnreadBubble/SSUnreadBubble.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// SSUnreadBubble
//
// Created by Shayne Sweeney on 12/13/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
// Copyright 2009. All rights reserved.
//

#import "SSUnreadBubble.h"
Expand Down

0 comments on commit 15595e7

Please sign in to comment.