Skip to content

Hi! I cleaned up your code for you! #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc

# Logs and databases #
######################
*.log

# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
6 changes: 3 additions & 3 deletions Demo/Classes/TSAVDemoAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ @implementation TSAVDemoAppDelegate
#pragma mark -
#pragma mark Application lifecycle

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

// Override point for customization after application launch.

// Add the view controller's view to the window and display.
Expand All @@ -39,7 +39,7 @@ - (void)applicationWillResignActive:(UIApplication *)application {

- (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.
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, called instead of applicationWillTerminate: when the user quits.
*/
}
Expand Down
8 changes: 4 additions & 4 deletions Demo/Classes/TSAVDemoViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
@interface TSAVDemoViewController : UIViewController <UITextFieldDelegate, UITextViewDelegate>
{
IBOutlet UITextField* _titleTextField;

IBOutlet UITextView* _messageTextView;

IBOutlet UITextField* _widthTextField;

IBOutlet UITextField* _maxHeightTextField;

IBOutlet UITextField* _buttonCountTextField;
Expand All @@ -24,7 +24,7 @@
IBOutlet UISwitch* _stackedSwitch;

IBOutlet UISwitch* _usesTextViewSwitch;

IBOutlet UISwitch* _hasInputFieldSwitch;
}

Expand Down
12 changes: 6 additions & 6 deletions Demo/Classes/TSAVDemoViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,26 @@ - (void) onAddMore:(id)sender
{
}

- (void) onShow:(id)sender
- (void) onShow:(id)sender
{
[_messageTextView resignFirstResponder];
[_titleTextField resignFirstResponder];
[_widthTextField resignFirstResponder];
[_maxHeightTextField resignFirstResponder];

TSAlertView* av = [[[TSAlertView alloc] init] autorelease];
av.title = _titleTextField.text;
av.message = _messageTextView.text;

for ( int i = 0 ; i < [_buttonCountTextField.text intValue] ; i++ )
{
[av addButtonWithTitle: [NSString stringWithFormat: @"Button %d", i]];
}

av.style = _hasInputFieldSwitch.on ? TSAlertViewStyleInput : TSAlertViewStyleNormal;
av.buttonLayout = _stackedSwitch.on ? TSAlertViewButtonLayoutStacked : TSAlertViewButtonLayoutNormal;
av.usesMessageTextView = _usesTextViewSwitch.on;

av.width = [_widthTextField.text floatValue];
av.maxHeight = [_maxHeightTextField.text floatValue];

Expand All @@ -75,7 +75,7 @@ - (BOOL)textFieldShouldReturn:(UITextField *)textField
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];

// Release any cached data, images, etc. that aren't in use.
}

Expand Down
2 changes: 1 addition & 1 deletion Demo/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>

int main(int argc, char *argv[]) {

NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
Expand Down
22 changes: 11 additions & 11 deletions Source Code License.rtf
Original file line number Diff line number Diff line change
Expand Up @@ -18,48 +18,48 @@ Thanks for downloading some of our source code!\
\
This is the license agreement for the source code which this document accompanies (don\'92t worry: you\'92re allowed to use it in your own products, commercial or otherwise).\
\
The full license text is further down this page, and you should only use the source code if you agree to the terms in that text. For convenience, though, we\'92ve put together a human-readable
The full license text is further down this page, and you should only use the source code if you agree to the terms in that text. For convenience, though, we\'92ve put together a human-readable
\b non-authoritative
\b0 interpretation of the license which will hopefully answer any questions you have.\
\
\

\b \cf3 Green
\b0 \cf2 text shows
\b0 \cf2 text shows
\b \cf3 what you can do with the code
\b0 \cf2 .\

\b \cf4 Red
\b0 \cf2 text means
\b0 \cf2 text means
\b \cf4 restrictions you must abide by
\b0 \cf2 .\
\
Basically, the license says that:\
\
\pard\tx220\tx720\pardeftab720\li720\fi-720\ql\qnatural
\ls1\ilvl0\cf2 {\listtext 1. }You can
\ls1\ilvl0\cf2 {\listtext 1. }You can
\b \cf3 use the code in your own products, including commercial and/or closed-source products
\b0 \cf2 .\
{\listtext 2. }You can
{\listtext 2. }You can
\b \cf3 modify the code
\b0 \cf0 as you wish\cf2 , and
\b0 \cf0 as you wish\cf2 , and
\b \cf3 use the modified code in your products
\b0 \cf2 .\
{\listtext 3. }You can
{\listtext 3. }You can
\b \cf3 redistribute the original, unmodified code
\b0 \cf2 , but you
\b0 \cf2 , but you
\b \cf4 have to include the full license text below
\b0 \cf2 .\
{\listtext 4. }You can
{\listtext 4. }You can
\b \cf3 redistribute the modified code
\b0 \cf2 as you wish (
\b \cf4 without the full license text below
\b0 \cf2 ).\
{\listtext 5. }In all cases, you
{\listtext 5. }In all cases, you
\b \cf4 must include a credit mentioning Nick Hodapp
\b0 \cf2 as the original author of the source.\
{\listtext 6. }Nick Hodapp is \cf0 not liable for anything you do with the code\cf2 , no matter what. So be sensible.\
{\listtext 7. }You
{\listtext 7. }You
\b \cf4 can\'92t use the name Nick Hodapp, the name CoDeveloper LLC, the CoDeveloper logo or any other related marks to promote your products
\b0 \cf2 based on the code.\
{\listtext 8. }If you agree to all of that, go ahead and use the source. Otherwise, don\'92t!\
Expand Down
6 changes: 3 additions & 3 deletions TSAlertView/TSAlertView.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@

#import <UIKit/UIKit.h>

typedef enum
typedef enum
{
TSAlertViewButtonLayoutNormal,
TSAlertViewButtonLayoutStacked

} TSAlertViewButtonLayout;

typedef enum
{
TSAlertViewStyleNormal,
TSAlertViewStyleInput,

} TSAlertViewStyle;

@class TSAlertViewController;
Expand Down
Loading