From 84c80ed34770ab59cbc9ce239b3210e7714aa95f Mon Sep 17 00:00:00 2001 From: "Gun.io Whitespace Robot" Date: Sat, 28 Jan 2012 15:15:40 -0500 Subject: [PATCH] Remove whitespace [WhitespaceBot] --- AboutController.h | 20 ++++---- AboutController.m | 42 ++++++++-------- AboutView.h | 20 ++++---- AboutView.m | 36 +++++++------- AddressFormatter.h | 20 ++++---- AddressFormatter.m | 20 ++++---- Build.h | 20 ++++---- Build.m | 22 ++++----- BuildDashboard.h | 20 ++++---- BuildDashboard.m | 30 +++++------ BuildDetail.h | 20 ++++---- BuildDetail.m | 36 +++++++------- BuildDetailController.h | 20 ++++---- BuildDetailController.m | 30 +++++------ BuildDetailView.h | 18 +++---- BuildDetailView.m | 58 +++++++++++----------- BuildDetailView.m.orig | 2 +- ConnectionFailedView.h | 20 ++++---- ConnectionFailedView.m | 26 +++++----- DisplayBuildsController.h | 20 ++++---- DisplayBuildsController.m | 88 ++++++++++++++++----------------- DisplayBuildsView.h | 18 +++---- DisplayBuildsView.m | 24 ++++----- EGORefreshTableHeaderView.h | 2 +- EGORefreshTableHeaderView.m | 64 ++++++++++++------------ LoadingView.h | 18 +++---- LoadingView.m | 16 +++--- MeaningfulErrors.h | 20 ++++---- MeaningfulErrors.m | 20 ++++---- NSArray+Blocks.m | 28 +++++------ NSString+Empty.h | 20 ++++---- NSString+Empty.m | 20 ++++---- NetworkCheck.h | 20 ++++---- NetworkCheck.m | 24 ++++----- NotificationView.m | 26 +++++----- SettingsController.h | 20 ++++---- SettingsController.m | 46 ++++++++--------- SettingsView.h | 18 +++---- SettingsView.m | 68 ++++++++++++------------- UIColor+Hex.m | 16 +++--- UILabel+Heading.h | 20 ++++---- UILabel+Heading.m | 20 ++++---- UINavigationBar+Utilities.h | 20 ++++---- UINavigationBar+Utilities.m | 28 +++++------ UINavigationController+Shadow.h | 20 ++++---- UINavigationController+Shadow.m | 26 +++++----- UIView+Size.h | 20 ++++---- UIView+Size.m | 22 ++++----- UserData.h | 20 ++++---- UserData.m | 32 ++++++------ iBroke/AppDelegate.h | 20 ++++---- iBroke/AppDelegate.m | 46 ++++++++--------- iBroke/main.m | 20 ++++---- 53 files changed, 695 insertions(+), 695 deletions(-) diff --git a/AboutController.h b/AboutController.h index 5caba27..393668e 100644 --- a/AboutController.h +++ b/AboutController.h @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 31/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/AboutController.m b/AboutController.m index 135e474..5192c81 100644 --- a/AboutController.m +++ b/AboutController.m @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 31/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import "AboutController.h" @@ -55,30 +55,30 @@ @implementation AboutController - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil; { self = [super initWithNibName:nil bundle:nil]; - + if (self) { [self setTitle:@"About"]; - + UIButton *settings = [[UIButton alloc] initWithFrame:CGRectMake(0., 0., 35., 35.)]; [settings setImage:[UIImage imageNamed:@"Settings"] forState:UIControlStateNormal]; [settings addTarget:self action:@selector(settings) forControlEvents:UIControlEventTouchUpInside]; [settings setUserInteractionEnabled:YES]; [settings setShowsTouchWhenHighlighted:YES]; - + UIBarButtonItem *settingsButton = [[UIBarButtonItem alloc] initWithCustomView:settings]; [[self navigationItem] setLeftBarButtonItem:settingsButton]; - + UIButton *email = [[UIButton alloc] initWithFrame:CGRectMake(0., 0., 30., 19.)]; [email setImage:[UIImage imageNamed:@"Email"] forState:UIControlStateNormal]; [email addTarget:self action:@selector(emailDeveloper) forControlEvents:UIControlEventTouchUpInside]; [email setUserInteractionEnabled:YES]; [email setShowsTouchWhenHighlighted:YES]; - + [[self navigationItem] setRightBarButtonItem:[[UIBarButtonItem alloc] initWithCustomView:email]]; } - + return self; } @@ -91,7 +91,7 @@ - (void)settings; [UIView setAnimationDuration:0.75]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO]; [UIView commitAnimations]; - + [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDelay:0.375]; [self.navigationController popViewControllerAnimated:NO]; @@ -107,10 +107,10 @@ - (void)emailDeveloper; [controller setMailComposeDelegate:self]; [controller setSubject:@"iBroke"]; [controller setModalPresentationStyle:UIModalPresentationFormSheet]; - [controller setMessageBody:@"" isHTML:NO]; + [controller setMessageBody:@"" isHTML:NO]; [controller setToRecipients:[NSArray arrayWithObject:@"ibroke@khalida-apps.com"]]; [controller setWantsFullScreenLayout:NO]; - + if (controller) { [[self navigationController] presentModalViewController:controller animated:YES]; @@ -123,7 +123,7 @@ - (void)emailDeveloper; andType:kErrorNotification]; [cantSendEmail setNeedsLayout]; [[self view] addSubview:cantSendEmail]; - + [UIView animateWithDuration:3.0 animations: ^ { [cantSendEmail setAlpha:0.0]; @@ -139,7 +139,7 @@ - (void)emailDeveloper; - (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error; { [controller dismissModalViewControllerAnimated:YES]; - + NSString *message = @""; NotificationType type = kSuccessNotification; if (result == MFMailComposeResultCancelled) diff --git a/AboutView.h b/AboutView.h index 88d150f..6bc4e97 100644 --- a/AboutView.h +++ b/AboutView.h @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 28/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/AboutView.m b/AboutView.m index 912afbb..7784c36 100644 --- a/AboutView.m +++ b/AboutView.m @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 28/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import "AboutView.h" @@ -109,7 +109,7 @@ - (id)initWithFrame:(CGRect)frame; [frameworks setTextColor:[UIColor colorWithHexString:@"76EE00"]]; [frameworks setBackgroundColor:[UIColor clearColor]]; [self addSubview:frameworks]; - + _resources = [[UILabel alloc] initWithFrame:CGRectZero]; [_resources setNumberOfLines:0.]; [_resources setLineBreakMode:UILineBreakModeWordWrap]; @@ -119,7 +119,7 @@ - (id)initWithFrame:(CGRect)frame; [_resources setBackgroundColor:[UIColor clearColor]]; [self addSubview:_resources]; - + [self setNeedsLayout]; [self setNeedsDisplay]; } @@ -129,10 +129,10 @@ - (id)initWithFrame:(CGRect)frame; - (void)layoutSubviews; { [[self dev] setFrame:CGRectMake(25., 10., 200., 20.)]; - + [[self about] setFrame:CGRectMake(20., 40., 280., 100.)]; [[self ack] setFrame:CGRectMake(20., 170., 280., 100.)]; - + [[self resources] setFrame:CGRectMake(20., 290., 280., 100.)]; } @@ -140,20 +140,20 @@ - (void)drawRect:(CGRect)rect; { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSaveGState(context); - + CGContextMoveToPoint(context, [self x_coord] + 210., [self y_coord] + 20.); - + CGContextAddLineToPoint(context, [self width] - 10., [self y_coord] + 20.); CGContextAddLineToPoint(context, [self width] - 10., [self height] - 20.); CGContextAddLineToPoint(context, [self x_coord] + 10., [self height] - 20.); CGContextAddLineToPoint(context, [self x_coord] + 10., [self y_coord] + 20.); CGContextAddLineToPoint(context, [self x_coord] + 35., [self y_coord] + 20.); - + CGContextSetAllowsAntialiasing(context, YES); CGContextSetStrokeColorWithColor(context, [[UIColor colorWithHexString:@"539DC2"] CGColor]); CGContextStrokePath(context); - + CGContextRestoreGState(context); } diff --git a/AddressFormatter.h b/AddressFormatter.h index 7b49b53..a0b2714 100644 --- a/AddressFormatter.h +++ b/AddressFormatter.h @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 19/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/AddressFormatter.m b/AddressFormatter.m index 8a7e595..c4e9094 100644 --- a/AddressFormatter.m +++ b/AddressFormatter.m @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 19/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import "AddressFormatter.h" diff --git a/Build.h b/Build.h index d214a07..e85121e 100644 --- a/Build.h +++ b/Build.h @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 20/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/Build.m b/Build.m index c08132f..e580b0a 100644 --- a/Build.m +++ b/Build.m @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 20/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import @@ -39,7 +39,7 @@ @implementation Build -(id)initWithName:(NSString *)name status:(NSString *)status url:(NSString *)url; { self = [super init]; - + if (self) { [self setUrl:url]; diff --git a/BuildDashboard.h b/BuildDashboard.h index b245695..f306757 100644 --- a/BuildDashboard.h +++ b/BuildDashboard.h @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 20/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/BuildDashboard.m b/BuildDashboard.m index 66a261e..d42d203 100644 --- a/BuildDashboard.m +++ b/BuildDashboard.m @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 20/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import "BuildDashboard.h" @@ -39,15 +39,15 @@ @implementation BuildDashboard -(id)initWithBuildData:(NSDictionary *)buildInfo; { self = [super init]; - + _builds = [[NSMutableArray alloc] init]; - + if (self) { [[buildInfo objectForKey:@"jobs"] each:^(id build) { - - [[self builds] addObject:[[Build alloc] initWithName:[build objectForKey:@"name"] - status:[build objectForKey:@"color"] + + [[self builds] addObject:[[Build alloc] initWithName:[build objectForKey:@"name"] + status:[build objectForKey:@"color"] url:[build objectForKey:@"url"]]]; }]; } diff --git a/BuildDetail.h b/BuildDetail.h index 01aee4b..8dda212 100644 --- a/BuildDetail.h +++ b/BuildDetail.h @@ -1,27 +1,27 @@ // // Created by mike_rowe on 28/10/11. // -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. diff --git a/BuildDetail.m b/BuildDetail.m index 536ea5d..3d56d52 100644 --- a/BuildDetail.m +++ b/BuildDetail.m @@ -1,27 +1,27 @@ // // Created by mike_rowe on 28/10/11. // -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. @@ -38,23 +38,23 @@ @implementation IndividualBuildData - (id)initWithUrl:(NSString *)url; { self = [super init]; - + if (self) { NSString *address = [NSString stringWithFormat:@"%@api/json/", url]; - + ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:address]]; [request setCachePolicy:ASIDoNotWriteToCacheCachePolicy]; [request startSynchronous]; - + if (![request error]) { SBJsonParser *parser = [[SBJsonParser alloc] init]; [self setData:[parser objectWithString:[request responseString] error:nil]]; } } - + return self; } @@ -84,18 +84,18 @@ - (id)initWithData:(NSDictionary *)data; [health each:^(id item) { [self setHealth:[[self health] stringByAppendingFormat:@"%@ ", [item objectForKey:@"description"]]]; }]; - + NSString *url = [[data objectForKey:@"lastBuild"] objectForKey:@"url"]; // NSString *url = @"http://ci.jenkins-ci.org/job/jenkins_lts_branch/15/"; IndividualBuildData *buildData = [[IndividualBuildData alloc ] initWithUrl:url]; - + __block NSString *changeSet = @""; NSArray *changeSetItems = [[[buildData data] objectForKey:@"changeSet"] objectForKey:@"items"]; [changeSetItems each:^(id item) { changeSet = [changeSet stringByAppendingFormat:@"%@. ", [item objectForKey:@"msg"]]; }]; [self setDescription:changeSet]; - + __block NSString *people = @""; NSArray *culpritNames = [[buildData data] objectForKey:@"culprits"]; [culpritNames each:^(id item) { @@ -103,7 +103,7 @@ - (id)initWithData:(NSDictionary *)data; }]; [self setCulprits:people]; } - + return self; } diff --git a/BuildDetailController.h b/BuildDetailController.h index d86d739..74f8f1d 100644 --- a/BuildDetailController.h +++ b/BuildDetailController.h @@ -2,27 +2,27 @@ // Created by mike_rowe on 28/10/11. // -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. diff --git a/BuildDetailController.m b/BuildDetailController.m index de24278..b754f13 100644 --- a/BuildDetailController.m +++ b/BuildDetailController.m @@ -1,27 +1,27 @@ // // Created by mike_rowe on 28/10/11. // -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. @@ -57,7 +57,7 @@ - (id)initWithBuild:(Build *)build; [list setImage:[UIImage imageNamed:@"list"] forState:UIControlStateNormal]; [list addTarget:self action:@selector(buildsDisplay) forControlEvents:UIControlEventTouchUpInside]; [list setShowsTouchWhenHighlighted:YES]; - + UIBarButtonItem *listButton = [[UIBarButtonItem alloc] initWithCustomView:list]; [[self navigationItem] setLeftBarButtonItem:listButton animated:YES]; [[self navigationItem] setHidesBackButton:NO animated:NO]; @@ -92,10 +92,10 @@ - (void)connectToAddress:(Build *)build; - (void)requestStarted:(ASIHTTPRequest *)request; { NSLog(@"%@",[NSString stringWithFormat:@"Connecting to the server: %@", [request url]]); - + LoadingView *loadingView = [[LoadingView alloc] initWithFrame:[_buildView bounds] andMessage:@"Loading build info..."]; [_buildView addSubview:loadingView]; - + [[self editButtonItem] setEnabled:NO]; } @@ -103,13 +103,13 @@ - (void)requestFinished:(ASIHTTPRequest *)request; { UIView *loadingView = [_buildView viewWithTag:3.]; [loadingView removeFromSuperview]; - + SBJsonParser *parser = [[SBJsonParser alloc] init]; NSDictionary *buildData = [parser objectWithString:[request responseString] error:nil]; BuildDetail *detail = [BuildDetail instanceWithData:buildData]; [[self buildView] setBuildData:detail]; - + [[self editButtonItem] setEnabled:YES]; } diff --git a/BuildDetailView.h b/BuildDetailView.h index 35918a3..6ccc861 100644 --- a/BuildDetailView.h +++ b/BuildDetailView.h @@ -3,23 +3,23 @@ // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/BuildDetailView.m b/BuildDetailView.m index 3d929d3..afd03c1 100644 --- a/BuildDetailView.m +++ b/BuildDetailView.m @@ -3,23 +3,23 @@ // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import @@ -50,8 +50,8 @@ @implementation BuildDetailLabel - (id)initWithFrame:(CGRect)frame andText:(NSString *)text; { self = [super initWithFrame:frame]; - - if (self) + + if (self) { [self setFrame:frame]; [self setTextAlignment:UITextAlignmentCenter]; @@ -68,8 +68,8 @@ - (id)initWithFrame:(CGRect)frame andText:(NSString *)text; - (CGSize)actualSize; { - return [[self text] sizeWithFont:[UIFont fontWithName:@"Verdana" size:15.] - constrainedToSize:CGSizeMake(280., 1000.) + return [[self text] sizeWithFont:[UIFont fontWithName:@"Verdana" size:15.] + constrainedToSize:CGSizeMake(280., 1000.) lineBreakMode:UILineBreakModeWordWrap]; } @@ -109,20 +109,20 @@ - (id)initWithFrame:(CGRect)frame; { [self setFrame:frame]; [self setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"Background.png"]]]; - + _healthLabel = [[UILabel alloc] initWithFrame:CGRectZero]; [_healthLabel defineStyleWithTitle:@"Health"]; [_healthLabel setHidden:YES]; [self addSubview:_healthLabel]; - + _healthReport = [[BuildDetailLabel alloc] initWithFrame:CGRectZero andText:@""]; [self addSubview:_healthReport]; - + _changeSetLabel = [[UILabel alloc] initWithFrame:CGRectZero]; [_changeSetLabel defineStyleWithTitle:@"Comment"]; [_changeSetLabel setHidden:YES]; [self addSubview:_changeSetLabel]; - + _changeset = [[BuildDetailLabel alloc] initWithFrame:CGRectZero andText:@""]; [self addSubview:_changeset]; @@ -131,7 +131,7 @@ - (id)initWithFrame:(CGRect)frame; [_culpritLabel setHidden:YES]; [self addSubview:_culpritLabel]; - _culprit = [[BuildDetailLabel alloc] initWithFrame:CGRectZero andText:@""]; + _culprit = [[BuildDetailLabel alloc] initWithFrame:CGRectZero andText:@""]; [self addSubview:_culprit]; } @@ -148,9 +148,9 @@ - (void)setBuildData:(BuildDetail *)buildDetail; [[self healthReport] setText: [[buildDetail health] isEmpty] ? [self placeholder] : [buildDetail health]]; [[self changeset] setText: [[buildDetail description] isEmpty] ? [self placeholder] : [buildDetail description]]; [[self culprit] setText: [[buildDetail culprits] isEmpty] ? [self placeholder] : [buildDetail culprits]]; - + [self setNeedsLayout]; - [self setNeedsDisplay]; + [self setNeedsDisplay]; } - (void)layoutSubviews; @@ -158,7 +158,7 @@ - (void)layoutSubviews; [_healthLabel setFrame:CGRectMake(30., 10., 60., 30.)]; CGSize healthReportSize = [_healthReport actualSize]; [_healthReport setFrame:CGRectMake(20., [_healthLabel y_coord] + 30., healthReportSize.width, healthReportSize.height)]; - + [_changeSetLabel setFrame:CGRectMake(30., [_healthLabel y_coord] + [[self healthReport] height] + kPaddingBetweenLabels, 150., 30.)]; CGSize changesetSize = [_changeset actualSize]; [_changeset setFrame:CGRectMake(20., [_changeSetLabel y_coord] + 30., changesetSize.width, changesetSize.height)]; @@ -166,7 +166,7 @@ - (void)layoutSubviews; [_culpritLabel setFrame:CGRectMake(30., [_changeSetLabel y_coord] + [[self changeset] height] + kPaddingBetweenLabels, 150., 30.)]; CGSize culpritSize = [_culprit actualSize]; [_culprit setFrame:CGRectMake(20., [_culpritLabel y_coord] + 30., culpritSize.width, culpritSize.height)]; - + CGFloat height = [_healthReport height] + [_changeset height] + [_culprit height] + 200.; [self setContentSize:CGSizeMake([self bounds].size.width, height)]; } @@ -174,14 +174,14 @@ - (void)layoutSubviews; #pragma mark - UIView Lifecycle - (void)drawRect:(CGRect)rect; -{ +{ CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSaveGState(context); CGContextSetAllowsAntialiasing(context, YES); CGContextSetLineWidth(context, 1.); - + CGFloat vertical_padding = 20.; - + NSString *healthReportText = [[self healthReport] text]; if ([healthReportText isNotEmpty]) { @@ -207,7 +207,7 @@ - (void)drawRect:(CGRect)rect; { CGFloat text_height = [[self changeset] height] + vertical_padding; CGFloat y_start = [[self changeSetLabel] y_coord] + [[self changeSetLabel] height] - 15.; - + [[self changeSetLabel] setHidden:NO]; // Draw box around Change set. @@ -227,9 +227,9 @@ - (void)drawRect:(CGRect)rect; { CGFloat text_height = [[self culprit] height] + vertical_padding; CGFloat y_start = [[self culpritLabel] y_coord] + [[self culpritLabel] height] - 15.; - + [[self culpritLabel] setHidden:NO]; - + // Draw box around Culprits. CGContextMoveToPoint(context, 120., y_start); CGContextSetStrokeColorWithColor(context, [[UIColor whiteColor] CGColor]); @@ -242,7 +242,7 @@ - (void)drawRect:(CGRect)rect; CGContextStrokePath(context); } - + CGContextRestoreGState(context); } diff --git a/BuildDetailView.m.orig b/BuildDetailView.m.orig index b0dfbe0..8a1da6a 100644 --- a/BuildDetailView.m.orig +++ b/BuildDetailView.m.orig @@ -28,7 +28,7 @@ [build_status setText:[NSString stringWithFormat:@"Status: %@", [build status]]]; [build_status setBackgroundColor:[UIColor clearColor]]; [self addSubview:build_status]; - + [self setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"Background.png"]]]; } return self; diff --git a/ConnectionFailedView.h b/ConnectionFailedView.h index 1aace58..7f4a364 100644 --- a/ConnectionFailedView.h +++ b/ConnectionFailedView.h @@ -3,27 +3,27 @@ // iBroke // // Created by Mujtaba Hussain on 31/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. diff --git a/ConnectionFailedView.m b/ConnectionFailedView.m index 92dac25..1f3870a 100644 --- a/ConnectionFailedView.m +++ b/ConnectionFailedView.m @@ -3,27 +3,27 @@ // iBroke // // Created by Mujtaba Hussain on 31/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. @@ -44,11 +44,11 @@ - (id)initWithFrame:(CGRect)frame withMessage:(NSString *)message; [self setFrame:frame]; [self setBackgroundColor:[UIColor blackColor]]; [self setAlpha:0.4]; - + const CGFloat DEFAULT_LABEL_WIDTH = 280.0; const CGFloat DEFAULT_LABEL_HEIGHT = 50.0; CGRect labelFrame = CGRectMake(0, 0, DEFAULT_LABEL_WIDTH, DEFAULT_LABEL_HEIGHT); - + UILabel *loadingLabel = [[UILabel alloc] initWithFrame:labelFrame]; [loadingLabel setText:NSLocalizedString(message, nil)]; [loadingLabel setTextColor:[UIColor colorWithHexString:@"76EE00"]]; @@ -56,7 +56,7 @@ - (id)initWithFrame:(CGRect)frame withMessage:(NSString *)message; [loadingLabel setTextAlignment:UITextAlignmentCenter]; [loadingLabel setFont:[UIFont fontWithName:@"Futura-Medium" size:20.]]; [self addSubview:loadingLabel]; - + CGFloat totalHeight = [loadingLabel height]; labelFrame.origin.x = floor(0.5 * ([self width] - DEFAULT_LABEL_WIDTH)); labelFrame.origin.y = floor(0.5 * ([self height] - totalHeight)); diff --git a/DisplayBuildsController.h b/DisplayBuildsController.h index 5fd4c62..6caa90d 100644 --- a/DisplayBuildsController.h +++ b/DisplayBuildsController.h @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 19/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/DisplayBuildsController.m b/DisplayBuildsController.m index f09b62e..61be264 100644 --- a/DisplayBuildsController.m +++ b/DisplayBuildsController.m @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 19/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import @@ -97,11 +97,11 @@ @implementation DisplayBuildsController - (id)initWithAddress:(NSString *)address; { self = [super initWithNibName:nil bundle:nil]; - + if (self) { [[self navigationItem] setHidesBackButton:YES animated:NO]; - + UIImage *image = [UIImage imageNamed:@"Settings"]; UIButton *settings = [[UIButton alloc] initWithFrame:CGRectMake(0., 0., 35., 35.)]; [settings setImage:image forState:UIControlStateNormal]; @@ -110,7 +110,7 @@ - (id)initWithAddress:(NSString *)address; UIBarButtonItem *settingsButton = [[UIBarButtonItem alloc] initWithCustomView:settings]; [[self navigationItem] setRightBarButtonItem:settingsButton animated:YES]; - + UIButton *editButton = [[UIButton alloc] initWithFrame:CGRectMake(0., 0., 35., 35.)]; [editButton setImage:[UIImage imageNamed:@"Edit"] forState:UIControlStateNormal]; [editButton addTarget:self action:@selector(editTableView) forControlEvents:UIControlEventTouchUpInside]; @@ -121,9 +121,9 @@ - (id)initWithAddress:(NSString *)address; [doneButton setImage:[UIImage imageNamed:@"Done"] forState:UIControlStateNormal]; [doneButton addTarget:self action:@selector(editTableView) forControlEvents:UIControlEventTouchUpInside]; [doneButton setShowsTouchWhenHighlighted:YES]; - + _done = [[UIBarButtonItem alloc] initWithCustomView:doneButton]; - + [[self navigationItem] setLeftBarButtonItem:_edit animated:YES]; [[[self navigationItem] leftBarButtonItem] setStyle:UIBarButtonItemStyleBordered]; [[[self navigationItem] leftBarButtonItem] setEnabled:NO]; @@ -151,7 +151,7 @@ - (void)settings; - (void)editTableView; { BOOL edit = ![self inFullTableEditMode]; - + if (edit) { [[self navigationItem] setLeftBarButtonItem:_done animated:YES]; @@ -165,7 +165,7 @@ - (void)editTableView; #pragma mark - ShakeToReload - (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event; -{ +{ } - (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event; @@ -178,7 +178,7 @@ - (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event; #pragma mark - ASyncRequest - (void)connectToAddress; -{ +{ if (![NetworkCheck isNetworkAvailable]) { NotificationView *noNetwork = [[NotificationView alloc] initWithFrame:CGRectZero @@ -186,7 +186,7 @@ - (void)connectToAddress; andType:kErrorNotification]; [noNetwork setNeedsLayout]; [[self view] addSubview:noNetwork]; - + [UIView animateWithDuration:3.0 animations:^{ [noNetwork setAlpha:0.0]; @@ -226,22 +226,22 @@ - (void)requestFinished:(ASIHTTPRequest *)request; UIView *loadingView = [[self buildsView] viewWithTag:3]; [loadingView removeFromSuperview]; - + // Set up the animation CATransition *animation = [CATransition animation]; [animation setType:kCATransitionFade]; - + [[loadingView layer] addAnimation:animation forKey:@"layerAnimation"]; - + SBJsonParser *parser = [[SBJsonParser alloc] init]; NSDictionary *buildData = [parser objectWithString:[request responseString] error:nil]; BuildDashboard *dashboard = [[BuildDashboard alloc] initWithBuildData:buildData]; - + [self setBuildData:[dashboard builds]]; [self restoreHiddenBuilds]; - + [self setFilteredBuilds:nil]; - + [[[self navigationItem] leftBarButtonItem] setEnabled:YES]; [[self buildsView] reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationFade]; } @@ -250,13 +250,13 @@ - (void)requestFailed:(ASIHTTPRequest *)request { NSError *error = [request error]; NSString *message = [MeaningfulErrors messageForErrorCode:[[request error] code]]; - + NotificationView *noNetwork = [[NotificationView alloc] initWithFrame:CGRectZero andMessage:message andType:kErrorNotification]; [noNetwork setNeedsLayout]; [[self view] addSubview:noNetwork]; - + [UIView animateWithDuration:3.0 animations:^{ [noNetwork setAlpha:0.0]; @@ -268,7 +268,7 @@ - (void)requestFailed:(ASIHTTPRequest *)request UIView *loadingView = [[self buildsView] viewWithTag:3]; [loadingView removeFromSuperview]; - + NSLog(@"Error Fetching Data %@",[error description]); [[self buildsView] reloadData]; } @@ -278,11 +278,11 @@ - (void)setEditing:(BOOL)editing animated:(BOOL)animated; [super setEditing:editing animated:animated]; [self setFilteredBuilds:nil]; [[self buildsView] setEditing:editing animated:animated]; - + double delayInSeconds = .4; dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC); dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ - + NSMutableArray *indexPaths = [NSMutableArray array]; if (editing) { @@ -293,7 +293,7 @@ - (void)setEditing:(BOOL)editing animated:(BOOL)animated; double delayInSeconds = .4; dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC); dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ - [[self buildsView] reloadData]; + [[self buildsView] reloadData]; }); } else @@ -304,7 +304,7 @@ - (void)setEditing:(BOOL)editing animated:(BOOL)animated; [[self buildsView] deleteRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationFade]; } }); - + [self setInFullTableEditMode:editing]; } @@ -329,7 +329,7 @@ - (NSArray *)builds; #pragma mark - View lifecycle - (void)viewWillAppear:(BOOL)animated; -{ +{ [super viewWillAppear:animated]; } @@ -362,7 +362,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath if ([build isFailed]) { BuildDetailController *detailViewController = [[BuildDetailController alloc] initWithBuild:build]; - + [[self navigationController] pushViewController:detailViewController animated:YES]; } @@ -375,9 +375,9 @@ - (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPat - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath { - + BOOL editingMode = [[self hiddenBuilds] containsObject:[[self builds] objectAtIndex:[indexPath row]]]; - + if (editingMode == YES) { // UIImageView *show = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"show"]]; @@ -387,10 +387,10 @@ - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleFo else { // UIImageView *show = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"hide"]]; -// [[tableView cellForRowAtIndexPath:indexPath] setEditingAccessoryView:show]; +// [[tableView cellForRowAtIndexPath:indexPath] setEditingAccessoryView:show]; return UITableViewCellEditingStyleDelete; } - + } - (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath @@ -401,7 +401,7 @@ - (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButto - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { Build *build = [[self builds] objectAtIndex:[indexPath row]]; - + if (![self inFullTableEditMode]) { [[self hiddenBuilds] addObject:build]; @@ -410,7 +410,7 @@ - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEd [[self buildsView] deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; return; } - + if ([[self hiddenBuilds] containsObject:build]) { [[self hiddenBuilds] removeObject:build]; @@ -465,7 +465,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N { [[cell detailTextLabel] setText:@"Disabled"]; [[cell detailTextLabel] setFont:[UIFont fontWithName:@"Verdana" size:10.]]; - + UIImageView *disabled = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"disabled"]]; [disabled setFrame:CGRectMake(0., 0., 15., 15.)]; [cell setAccessoryView:disabled]; @@ -494,7 +494,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N [cell setAccessoryType:UITableViewCellAccessoryCheckmark]; [[cell detailTextLabel] setText:@""]; } - + return cell; } @@ -512,14 +512,14 @@ -(void)saveHiddenBuilds; Build *build = (Build*)item; return [NSString stringWithFormat:@"%@::%@", [build url], [build name]]; }]; - + [[NSUserDefaults standardUserDefaults] setObject:buildIds forKey:kHiddenBuildsKey]; } -(void)restoreHiddenBuilds; { NSArray *buildIds = [[NSUserDefaults standardUserDefaults] objectForKey:kHiddenBuildsKey]; - + [self setHiddenBuilds:[NSMutableArray arrayWithArray:[[self buildData] pick:^BOOL(id item) { Build *build = (Build*)item; return [buildIds containsObject:[NSString stringWithFormat:@"%@::%@", [build url], [build name]]]; diff --git a/DisplayBuildsView.h b/DisplayBuildsView.h index aae01a9..2a9e1ac 100644 --- a/DisplayBuildsView.h +++ b/DisplayBuildsView.h @@ -6,23 +6,23 @@ // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/DisplayBuildsView.m b/DisplayBuildsView.m index f58217a..e3c5e77 100644 --- a/DisplayBuildsView.m +++ b/DisplayBuildsView.m @@ -5,23 +5,23 @@ // Created by Mujtaba Hussain on 19/10/11. // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import @@ -37,7 +37,7 @@ - (id)initWithFrame:(CGRect)frame style:(UITableViewStyle)style; { [self setSeparatorStyle:UITableViewCellSeparatorStyleNone]; [self setRowHeight:50.]; - [self setBackgroundView:[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Background.png"]]]; + [self setBackgroundView:[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Background.png"]]]; } return self; } @@ -48,12 +48,12 @@ - (void)drawRect:(CGRect)rect; CGContextSaveGState(context); CGContextSetAllowsAntialiasing(context, YES); CGContextSetLineWidth(context, 4.); - + CGContextSetStrokeColorWithColor(context, [[UIColor whiteColor] CGColor]); CGContextMoveToPoint(context, 10., 100.); CGContextAddLineToPoint(context, 10., 200.); CGContextStrokePath(context); - + CGContextRestoreGState(context); } diff --git a/EGORefreshTableHeaderView.h b/EGORefreshTableHeaderView.h index 6103546..eea77d9 100755 --- a/EGORefreshTableHeaderView.h +++ b/EGORefreshTableHeaderView.h @@ -30,7 +30,7 @@ //typedef enum{ // EGOOPullRefreshPulling = 0, // EGOOPullRefreshNormal, -// EGOOPullRefreshLoading, +// EGOOPullRefreshLoading, //} EGOPullRefreshState; // //@class SkinManager; diff --git a/EGORefreshTableHeaderView.m b/EGORefreshTableHeaderView.m index 7298ae5..2bd7dba 100755 --- a/EGORefreshTableHeaderView.m +++ b/EGORefreshTableHeaderView.m @@ -38,7 +38,7 @@ // [label setTextColor: [skin colorNamed:@"text"]]; // [label setShadowColor: [skin colorNamed:@"text-shadow"]]; // [label setBackgroundColor: [skin colorNamed:@"dark-grey-texture"]]; -// +// // return [label autorelease]; //} //@end @@ -62,7 +62,7 @@ // RELEASE(statuslabel_); // RELEASE(arrowImage_); // RELEASE(activityView_); -// +// // [super dealloc]; //} // @@ -72,20 +72,20 @@ //- (void)setDelegate:(id)delegate; //{ // delegate_ = delegate; -// +// // [self refreshLastUpdatedDate]; -// +// // Assert([[self delegate] respondsToSelector:@selector(egoRefreshTableHeaderDataSourceIsLoading:)]); // // [self setState:[[self delegate] egoRefreshTableHeaderDataSourceIsLoading:self] ? EGOOPullRefreshLoading : EGOOPullRefreshNormal]; //} // //- (void)setState:(EGOPullRefreshState)state; -//{ +//{ // switch (state) // { // case EGOOPullRefreshPulling: -// +// // [[self statusLabel] setText: NSLocalizedString(@"Release to update", @"Release to update status")]; // [[self statusLabel] sizeToFit]; // @@ -93,10 +93,10 @@ // [CATransaction setAnimationDuration:FLIP_ANIMATION_DURATION]; // [[self arrowImage] setTransform: CATransform3DMakeRotation(M_PI, 0., 0., 1.)]; // [CATransaction commit]; -// +// // break; // case EGOOPullRefreshNormal: -// +// // if ([self state] == EGOOPullRefreshPulling) // { // [CATransaction begin]; @@ -104,36 +104,36 @@ // [[self arrowImage] setTransform: CATransform3DIdentity]; // [CATransaction commit]; // } -// +// // [[self statusLabel] setText: NSLocalizedString(@"Pull to update", @"Pull to update status")]; // [[self statusLabel] sizeToFit]; -// +// // [[self activityView] stopAnimating]; -// +// // [CATransaction begin]; -// [CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions]; +// [CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions]; // [[self arrowImage] setHidden: NO]; // [[self arrowImage] setTransform: CATransform3DIdentity]; // [CATransaction commit]; -// +// // [self refreshLastUpdatedDate]; -// +// // break; // case EGOOPullRefreshLoading: -// +// // [[self statusLabel] setText: NSLocalizedString(@"Loading\u2026", @"Loading Status")]; // [[self statusLabel] sizeToFit]; -// +// // [[self activityView] startAnimating]; -// +// // [CATransaction begin]; -// [CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions]; +// [CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions]; // [[self arrowImage] setHidden: YES]; // [CATransaction commit]; -// +// // break; // } -// +// // state_ = state; //} // @@ -143,30 +143,30 @@ //{ //} // -//#pragma mark - +//#pragma mark - // //- (void)refreshLastUpdatedDate; //{ // [[self lastUpdatedLabel] setText:nil]; -// +// // if ([[self delegate] respondsToSelector:@selector(egoRefreshTableHeaderDataSourceLastUpdated:)]) // { // NSDate *date = [delegate_ egoRefreshTableHeaderDataSourceLastUpdated:self]; -// +// // if (![date isEqualToDate:[NSDate distantPast]]) // { // NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; -// +// // [formatter setLocale:[NSLocale currentLocale]]; // [formatter setDateStyle:NSDateFormatterShortStyle]; // [formatter setTimeStyle:NSDateFormatterShortStyle]; -// +// // [[self lastUpdatedLabel] setText: [NSString stringWithFormat:NSLocalizedString(@"Last updated %1$@",@"Last Updated string and format"), [formatter stringFromDate:date]]]; // [[self lastUpdatedLabel] sizeToFit]; -// +// // [[NSUserDefaults standardUserDefaults] setObject:[[self lastUpdatedLabel] text] forKey:@"EGORefreshTableView_LastRefresh"]; // [[NSUserDefaults standardUserDefaults] synchronize]; -// +// // [formatter release]; // } // } @@ -181,14 +181,14 @@ // //- (BOOL)extentGreaterThanThreshold:(UIScrollView *)scrollView; //{ -// +// // return (([scrollView contentOffset].y > -[self stateThreshold] && [scrollView contentOffset].y < 0.) || ([scrollView contentOffset].x > -[self stateThreshold] && [scrollView contentOffset].x < 0.)); //} // //- (void)egoRefreshScrollViewDidScroll:(UIScrollView *)scrollView; -//{ +//{ // if (![scrollView isDragging] || [[self delegate] performSelectorSafely:@selector(egoRefreshTableHeaderDataSourceIsLoading:) withObject:self]) return; -// +// // if (([self state] == EGOOPullRefreshPulling) && [self extentGreaterThanThreshold:scrollView]) // { // [self setState:EGOOPullRefreshNormal]; @@ -196,13 +196,13 @@ // else if (([self state] == EGOOPullRefreshNormal) && [self extentLessThanThreshold:scrollView]) // { // [self setState:EGOOPullRefreshPulling]; -// } +// } //} // //- (void)egoRefreshScrollViewDidEndDragging:(UIScrollView *)scrollView; //{ // if ([[self delegate] performSelectorSafely:@selector(egoRefreshTableHeaderDataSourceIsLoading:) withObject:self]) return; -// +// // if ([self extentLessThanThreshold:scrollView]) // { // [self setState:EGOOPullRefreshLoading]; diff --git a/LoadingView.h b/LoadingView.h index 80c7e9a..a8a8e05 100644 --- a/LoadingView.h +++ b/LoadingView.h @@ -6,23 +6,23 @@ // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/LoadingView.m b/LoadingView.m index 024502d..b161904 100644 --- a/LoadingView.m +++ b/LoadingView.m @@ -4,7 +4,7 @@ // // Created by Mujtaba Hussain on 28/10/11. // Copyright Matt Gallagher 2009. All rights reserved. -// +// // Permission is given to use this source code file, free of charge, in any // project, commercial or otherwise, entirely at your risk, with the condition // that any redistribution (in part or whole) of source code must retain @@ -23,17 +23,17 @@ @implementation LoadingView - (id)initWithFrame:(CGRect)frame andMessage:(NSString *)message; { self = [super initWithFrame:frame]; - + if (self) { [self setTag:3]; [self setBackgroundColor:[UIColor blackColor]]; [self setAlpha:0.4]; - + const CGFloat DEFAULT_LABEL_WIDTH = 280.0; const CGFloat DEFAULT_LABEL_HEIGHT = 50.0; CGRect labelFrame = CGRectMake(0, 0, DEFAULT_LABEL_WIDTH, DEFAULT_LABEL_HEIGHT); - + UILabel *loadingLabel = [[UILabel alloc] initWithFrame:labelFrame]; [loadingLabel setText:NSLocalizedString(message, nil)]; [loadingLabel setTextColor:[UIColor colorWithHexString:@"FFE600"]]; @@ -41,22 +41,22 @@ - (id)initWithFrame:(CGRect)frame andMessage:(NSString *)message; [loadingLabel setTextAlignment:UITextAlignmentCenter]; [loadingLabel setFont:[UIFont fontWithName:@"Futura-Medium" size:20.]]; [self addSubview:loadingLabel]; - + UIActivityIndicatorView *activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; [self addSubview:activityIndicatorView]; [activityIndicatorView startAnimating]; - + CGFloat totalHeight = [loadingLabel height] + [activityIndicatorView height]; labelFrame.origin.x = floor(0.5 * ([self width] - DEFAULT_LABEL_WIDTH)); labelFrame.origin.y = floor(0.5 * ([self height] - totalHeight)); [loadingLabel setFrame:labelFrame]; - + CGRect activityIndicatorRect = [activityIndicatorView frame]; activityIndicatorRect.origin.x = 0.5 * ([self width] - activityIndicatorRect.size.width); activityIndicatorRect.origin.y = [loadingLabel y_coord] + [loadingLabel height]; [activityIndicatorView setFrame:activityIndicatorRect]; - + // Set up the fade-in animation CATransition *animation = [CATransition animation]; [animation setType:kCATransitionFade]; diff --git a/MeaningfulErrors.h b/MeaningfulErrors.h index ba23f6e..48c6c2b 100644 --- a/MeaningfulErrors.h +++ b/MeaningfulErrors.h @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 31/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/MeaningfulErrors.m b/MeaningfulErrors.m index 9593871..69a2fba 100644 --- a/MeaningfulErrors.m +++ b/MeaningfulErrors.m @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 31/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import "MeaningfulErrors.h" diff --git a/NSArray+Blocks.m b/NSArray+Blocks.m index a90090f..fb33bfa 100644 --- a/NSArray+Blocks.m +++ b/NSArray+Blocks.m @@ -48,7 +48,7 @@ - (void)eachWithIndex:(void (^)(id, int))block; - (NSArray *)filter:(BOOL (^)(id))block; { NSMutableArray *result = [NSMutableArray array]; - + for (id obj in self) { if (!block(obj)) @@ -56,14 +56,14 @@ - (NSArray *)filter:(BOOL (^)(id))block; [result addObject:obj]; } } - + return result; } - (NSArray *)pick:(BOOL (^)(id))block; { NSMutableArray *result = [NSMutableArray array]; - + for (id obj in self) { if (block(obj)) @@ -71,14 +71,14 @@ - (NSArray *)pick:(BOOL (^)(id))block; [result addObject:obj]; } } - + return result; } - (id)first:(BOOL (^)(id))block; { id result = nil; - + for (id obj in self) { if (block(obj)) @@ -87,7 +87,7 @@ - (id)first:(BOOL (^)(id))block; break; } } - + return result; } @@ -99,7 +99,7 @@ - (NSUInteger)indexOfFirst:(BOOL (^)(id item))block; *stop = YES; return YES; } - + return NO; }]; } @@ -107,7 +107,7 @@ - (NSUInteger)indexOfFirst:(BOOL (^)(id item))block; - (id)last:(BOOL (^)(id))block; { id result = nil; - + for (id obj in [self reverseObjectEnumerator]) { if (block(obj)) @@ -116,7 +116,7 @@ - (id)last:(BOOL (^)(id))block; break; } } - + return result; } @@ -128,7 +128,7 @@ - (NSUInteger)indexOfLast:(BOOL (^)(id item))block; *stop = YES; return YES; } - + return NO; }]; } @@ -136,24 +136,24 @@ - (NSUInteger)indexOfLast:(BOOL (^)(id item))block; - (NSArray *)map:(id (^)(id item))block; { NSMutableArray *result = [NSMutableArray arrayWithCapacity:[self count]]; - + for (id obj in self) { [result addObject:block(obj)]; } - + return [NSArray arrayWithArray:result]; } - (id)reduce:(id (^)(id current, id item))block initial:(id)initial; { id result = initial; - + for (id obj in self) { result = block(result, obj); } - + return result; } diff --git a/NSString+Empty.h b/NSString+Empty.h index 9554e18..dd361ff 100644 --- a/NSString+Empty.h +++ b/NSString+Empty.h @@ -3,27 +3,27 @@ // iBroke // // Created by Mujtaba Hussain on 29/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/NSString+Empty.m b/NSString+Empty.m index d959583..97eb9a2 100644 --- a/NSString+Empty.m +++ b/NSString+Empty.m @@ -3,27 +3,27 @@ // iBroke // // Created by Mujtaba Hussain on 29/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import "NSString+Empty.h" diff --git a/NetworkCheck.h b/NetworkCheck.h index febbdb0..d2cd9fe 100644 --- a/NetworkCheck.h +++ b/NetworkCheck.h @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 1/11/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/NetworkCheck.m b/NetworkCheck.m index 7ea843e..8b2e1f6 100644 --- a/NetworkCheck.m +++ b/NetworkCheck.m @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 1/11/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import "NetworkCheck.h" @@ -35,10 +35,10 @@ + (BOOL)isNetworkAvailable; { Reachability *r = [Reachability reachabilityWithHostName:@"www.apple.com"]; NetworkStatus internetStatus = [r currentReachabilityStatus]; - + if(internetStatus == NotReachable) return NO; - + return YES; } diff --git a/NotificationView.m b/NotificationView.m index b4acbcb..45b6525 100644 --- a/NotificationView.m +++ b/NotificationView.m @@ -6,23 +6,23 @@ // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import "NotificationView.h" @@ -48,13 +48,13 @@ - (id)initWithFrame:(CGRect)frame andMessage:(NSString *)message andType:(Notifi [self setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"Error"]]]; else if (type == kSuccessNotification) [self setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"Success"]]]; - + _messageLabel = [[UILabel alloc] initWithFrame:CGRectZero]; [_messageLabel setBackgroundColor:[UIColor clearColor]]; [_messageLabel setTextColor:[UIColor whiteColor]]; [_messageLabel setFont:[UIFont fontWithName:@"Verdana" size:15.]]; [_messageLabel setText:message]; - + [self addSubview:_messageLabel]; } return self; @@ -65,10 +65,10 @@ - (id)initWithFrame:(CGRect)frame andMessage:(NSString *)message andType:(Notifi - (void)layoutSubviews; { [self setFrame:CGRectMake(0., 0., 320., 50.)]; - + CGSize expectedSize = [[[self messageLabel] text] sizeWithFont:[UIFont fontWithName:@"Verdana" size:15.] constrainedToSize:[self bounds].size]; - + [[self messageLabel] setFrame:CGRectMake(([self width] - expectedSize.width)/2, ([self height] - expectedSize.height)/2, expectedSize.width, expectedSize.height)]; } diff --git a/SettingsController.h b/SettingsController.h index 647518d..333dfd6 100644 --- a/SettingsController.h +++ b/SettingsController.h @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 19/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/SettingsController.m b/SettingsController.m index 213a6d3..aea82c3 100644 --- a/SettingsController.m +++ b/SettingsController.m @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 19/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import "SettingsController.h" @@ -61,29 +61,29 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil if (self) { [self setTitle:@"Settings"]; - + UIButton *infoButton = [[UIButton alloc] initWithFrame:CGRectMake(0., 0., 42., 42.)]; [infoButton setImage:[UIImage imageNamed:@"about"] forState:UIControlStateNormal]; [infoButton setUserInteractionEnabled:YES]; [infoButton addTarget:self action:@selector(about) forControlEvents:UIControlEventTouchUpInside]; [infoButton setShowsTouchWhenHighlighted:YES]; - + UIBarButtonItem *about = [[UIBarButtonItem alloc] initWithCustomView:infoButton]; [[self navigationItem] setLeftBarButtonItem:about]; - + UIButton *connect = [[UIButton alloc] initWithFrame:CGRectMake(0., 0., 34., 21.)]; [connect setImage:[UIImage imageNamed:@"Connect"] forState:UIControlStateNormal]; [connect addTarget:self action:@selector(connect) forControlEvents:UIControlEventTouchUpInside]; [connect setShowsTouchWhenHighlighted:YES]; - + UIBarButtonItem *connectButton = [[UIBarButtonItem alloc] initWithCustomView:connect]; [[self navigationItem] setRightBarButtonItem:connectButton animated:YES]; - + [[self navigationItem] setRightBarButtonItem:connectButton animated:YES]; [[self navigationItem] setHidesBackButton:YES]; - + [self setAboutController:[[AboutController alloc] initWithNibName:nil bundle:nil]]; - + } return self; } @@ -105,7 +105,7 @@ -(void)connect; andType:kErrorNotification]; [noNetwork setNeedsLayout]; [[self view] addSubview:noNetwork]; - + [UIView animateWithDuration:3.0 animations:^{ [noNetwork setAlpha:0.0]; @@ -122,7 +122,7 @@ -(void)connect; NotificationView *empty = [[NotificationView alloc] initWithFrame:CGRectZero andMessage:kEmptyHostname andType:kErrorNotification]; [empty setNeedsLayout]; [[self view] addSubview:empty]; - + [UIView animateWithDuration:3.0 animations: ^ { [empty setAlpha:0.0]; @@ -135,7 +135,7 @@ -(void)connect; else { [UserData save:hostname forKey:@"hostname"]; - [[self navigationController] pushViewController:[[DisplayBuildsController alloc] + [[self navigationController] pushViewController:[[DisplayBuildsController alloc] initWithAddress:[NSString stringWithFormat:@"%@/api/json/", hostname]] animated:YES]; } @@ -143,13 +143,13 @@ -(void)connect; - (void)about; { - + [UIView beginAnimations:nil context:NULL]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; [UIView setAnimationDuration:0.75]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:[[self navigationController] view] cache:NO]; [UIView commitAnimations]; - + [UIView beginAnimations:nil context:NULL]; [[self navigationController] pushViewController:[self aboutController] animated:NO]; [UIView commitAnimations]; @@ -167,7 +167,7 @@ - (void)loadView; { [self setSettingsView:[[SettingsView alloc] initWithFrame:CGRectZero]]; [[self settingsView] sizeToFit]; - + [self setView:[self settingsView]]; } diff --git a/SettingsView.h b/SettingsView.h index be88522..4ef397a 100644 --- a/SettingsView.h +++ b/SettingsView.h @@ -6,23 +6,23 @@ // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/SettingsView.m b/SettingsView.m index af129dd..ca216cc 100644 --- a/SettingsView.m +++ b/SettingsView.m @@ -6,23 +6,23 @@ // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import "SettingsView.h" @@ -49,12 +49,12 @@ @implementation CustomerController - (id)initWithSettingsView:(SettingsView *)view; { self = [super initWithNibName:nil bundle:nil]; - + if (self) { - _v = view; + _v = view; } - + return self; } @@ -67,7 +67,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath - (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath; { - + } #pragma mark - UITableViewDataSource @@ -80,20 +80,20 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath; { UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"]; - + if (nil == cell) cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Cell"]; - + [[cell imageView] setImage:[UIImage imageNamed:@"action"]]; - + [[cell textLabel] setFont:[UIFont fontWithName:@"Futura-Medium" size:16.]]; [[cell textLabel] setTextColor:[UIColor colorWithHexString:@"00FF7F"]]; - [cell setBackgroundColor:[UIColor clearColor]]; - + [cell setBackgroundColor:[UIColor clearColor]]; + NSArray *previous_hostnames = [UserData previousHosts]; - + [[cell textLabel] setText:[previous_hostnames objectAtIndex:[indexPath row]]]; - + return cell; } @@ -123,15 +123,15 @@ - (id)initWithFrame:(CGRect)frame self = [super initWithFrame:frame]; if (self) - { + { UILabel *url_label = [[UILabel alloc] initWithFrame:CGRectMake(32., 7., 230., 30.)]; [url_label setText:@"Connect to"]; [url_label setTextColor:[UIColor colorWithHexString:@"539DC2"]]; [url_label setBackgroundColor:[UIColor clearColor]]; [url_label setFont:[UIFont fontWithName:@"Futura-Medium" size:20.]]; [self addSubview:url_label]; - - + + _server = [[UITextField alloc] initWithFrame:CGRectMake(20., 34., 270., 40.)]; [_server setKeyboardType:UIKeyboardTypeURL]; [_server setTextAlignment:UITextAlignmentLeft]; @@ -144,20 +144,20 @@ - (id)initWithFrame:(CGRect)frame [_server setBackgroundColor:[UIColor whiteColor]]; [_server setFont:[UIFont fontWithName:@"Verdana" size:15.]]; [_server setTextColor:[UIColor blackColor]]; - + UIView *paddingView = [[UIView alloc] initWithFrame:CGRectMake(0., 0., 20., [[self server] height])]; [[self server] setLeftView:paddingView]; [[self server] setLeftViewMode:UITextFieldViewModeAlways]; - + NSString *hostnameText = [UserData get:@"hostname"]; if ([hostnameText isNotEmpty]) [_server setText:hostnameText]; else [_server setPlaceholder:@"http://server:port/suffix"]; - + [self addSubview:_server]; - + UILabel *previous_hosts_label = [[UILabel alloc] initWithFrame:CGRectMake(27., 163., 230., 35.)]; [previous_hosts_label setText:@"Previous hosts"]; [previous_hosts_label setTextColor:[UIColor colorWithHexString:@"539DC2"]]; @@ -174,9 +174,9 @@ - (id)initWithFrame:(CGRect)frame [_previousHosts setAlpha:0.4]; [self addSubview:_previousHosts]; - + [self setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"Background.png"]]]; - + [self layoutIfNeeded]; } return self; @@ -191,14 +191,14 @@ - (void)layoutSubviews; } - (void)drawRect:(CGRect)rect; -{ +{ CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSaveGState(context); CGContextSetAllowsAntialiasing(context, YES); CGContextSetLineWidth(context, 1.); CGFloat startingYOffset = [[self server] y_coord] - 10.; - + CGContextMoveToPoint(context, 140., startingYOffset); CGContextSetStrokeColorWithColor(context, [[UIColor whiteColor] CGColor]); CGContextAddLineToPoint(context, 140., startingYOffset); @@ -208,10 +208,10 @@ - (void)drawRect:(CGRect)rect; CGContextAddLineToPoint(context, 10., startingYOffset); CGContextAddLineToPoint(context, 25., startingYOffset); CGContextStrokePath(context); - + CGFloat previous_hosts_x = 150.; CGFloat previous_hosts_y = 180.; - + CGContextMoveToPoint(context, previous_hosts_x + 10. , previous_hosts_y); CGContextSetStrokeColorWithColor(context, [[UIColor whiteColor] CGColor]); CGContextAddLineToPoint(context, previous_hosts_x + 10., previous_hosts_y); @@ -221,7 +221,7 @@ - (void)drawRect:(CGRect)rect; CGContextAddLineToPoint(context, previous_hosts_x - 140., previous_hosts_y); CGContextAddLineToPoint(context, previous_hosts_x - 130, previous_hosts_y); CGContextStrokePath(context); - + CGContextRestoreGState(context); } diff --git a/UIColor+Hex.m b/UIColor+Hex.m index 1ef1c52..3575158 100644 --- a/UIColor+Hex.m +++ b/UIColor+Hex.m @@ -50,32 +50,32 @@ + (UIColor *)colorWithHex:(NSInteger)color alpha:(float)alpha + (UIColor *)colorWithHexString:(NSString *)hexString; { if (nil == hexString) return nil; - + NSString *alphaString = nil; NSUInteger aValue = 0; - + if ([hexString length] == 10) { alphaString = [hexString substringWithRange:NSRangeFromString(@"2 2")]; NSScanner *aScanner = [NSScanner scannerWithString:alphaString]; - + BOOL parseSuccessful = [aScanner scanHexInt: &aValue]; NSAssert(parseSuccessful, @"Invalid extended hex color alpha %@", alphaString); - + hexString = [NSString stringWithFormat:@"%@%@",[hexString substringWithRange:NSRangeFromString(@"0 2")],[hexString substringWithRange:NSRangeFromString(@"4 6")]]; } - + NSScanner *pScanner = [NSScanner scannerWithString:hexString]; - + NSUInteger iValue; BOOL parseSuccessful = [pScanner scanHexInt: &iValue]; NSAssert(parseSuccessful, @"Invalid hex color %@", hexString); - + if (aValue > 0) { return [UIColor colorWithHex:iValue alpha:((float)aValue/255.0)]; } - + return [UIColor colorWithHex:iValue]; } diff --git a/UILabel+Heading.h b/UILabel+Heading.h index 06e04d6..a183226 100644 --- a/UILabel+Heading.h +++ b/UILabel+Heading.h @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 29/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/UILabel+Heading.m b/UILabel+Heading.m index 5a34df0..456ad6d 100644 --- a/UILabel+Heading.m +++ b/UILabel+Heading.m @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 29/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import "UILabel+Heading.h" diff --git a/UINavigationBar+Utilities.h b/UINavigationBar+Utilities.h index 74ae1e9..f63d53d 100644 --- a/UINavigationBar+Utilities.h +++ b/UINavigationBar+Utilities.h @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 30/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/UINavigationBar+Utilities.m b/UINavigationBar+Utilities.m index a2a570d..d77cb44 100644 --- a/UINavigationBar+Utilities.m +++ b/UINavigationBar+Utilities.m @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 30/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import "UINavigationBar+Utilities.h" @@ -35,13 +35,13 @@ @implementation UINavigationBar (Utilities) - (void)drawRect:(CGRect)rect; { - + if([self isMemberOfClass: [UINavigationBar class]]) { CGContextRef context = UIGraphicsGetCurrentContext(); - + UIImage *image = [UIImage imageNamed:@"navbar.png"]; - + CGContextClip(context); CGContextTranslateCTM(context, 0, [image size].height); CGContextScaleCTM(context, 1.0, -1.0); @@ -51,7 +51,7 @@ - (void)drawRect:(CGRect)rect; { [super drawRect:rect]; } - + } @end \ No newline at end of file diff --git a/UINavigationController+Shadow.h b/UINavigationController+Shadow.h index d7ffef2..c3d05bb 100644 --- a/UINavigationController+Shadow.h +++ b/UINavigationController+Shadow.h @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 31/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/UINavigationController+Shadow.m b/UINavigationController+Shadow.m index f7c3079..8189e70 100644 --- a/UINavigationController+Shadow.m +++ b/UINavigationController+Shadow.m @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 31/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import @@ -40,12 +40,12 @@ - (void)viewWillAppear:(BOOL)animated CGColorRef darkColor = [[[UIColor blackColor] colorWithAlphaComponent:.6f] CGColor]; CGColorRef lightColor = [[UIColor clearColor] CGColor]; CGFloat navigationBarBottom = [[self navigationBar] y_coord] + [[self navigationBar] height]; - + CAGradientLayer *newShadow = [[[CAGradientLayer alloc] init] autorelease]; - + newShadow.frame = CGRectMake(0. ,navigationBarBottom, [[self view] width], 10.); newShadow.colors = [NSArray arrayWithObjects:(id)darkColor, (id)lightColor, nil]; - + [[[self view] layer] addSublayer:newShadow]; [super viewWillAppear:animated]; } diff --git a/UIView+Size.h b/UIView+Size.h index 8346f73..775fb4c 100644 --- a/UIView+Size.h +++ b/UIView+Size.h @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 31/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/UIView+Size.m b/UIView+Size.m index 1eaca3a..79494ce 100644 --- a/UIView+Size.m +++ b/UIView+Size.m @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 31/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import "UIView+Size.h" @@ -48,7 +48,7 @@ -(CGFloat)x_coord; -(CGFloat)y_coord; { - return [self frame].origin.y; + return [self frame].origin.y; } @end diff --git a/UserData.h b/UserData.h index 65f8d5e..28d394b 100644 --- a/UserData.h +++ b/UserData.h @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 27/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/UserData.m b/UserData.m index 121fd8b..60417d5 100644 --- a/UserData.m +++ b/UserData.m @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 27/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import "UserData.h" @@ -36,13 +36,13 @@ @implementation UserData + (void)save:(NSString *)data forKey:(NSString *)key; { NSUserDefaults *standardUserDefaults = [NSUserDefaults standardUserDefaults]; - + static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ servers = [[NSMutableSet alloc] init]; }); - + if (standardUserDefaults) { [standardUserDefaults setObject:data forKey:key]; @@ -59,10 +59,10 @@ + (NSString *)get:(NSString *)key; { NSUserDefaults *standardUserDefaults = [NSUserDefaults standardUserDefaults]; NSString *val = nil; - - if (standardUserDefaults) + + if (standardUserDefaults) val = [standardUserDefaults objectForKey:key]; - + return val; } @@ -73,7 +73,7 @@ + (NSArray *)previousHosts; if (standardUserDefaults) hosts = [standardUserDefaults objectForKey:@"previous_hosts"]; - + return hosts; } diff --git a/iBroke/AppDelegate.h b/iBroke/AppDelegate.h index 194ee8d..b150729 100644 --- a/iBroke/AppDelegate.h +++ b/iBroke/AppDelegate.h @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 19/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import diff --git a/iBroke/AppDelegate.m b/iBroke/AppDelegate.m index 9d97294..e984a75 100644 --- a/iBroke/AppDelegate.m +++ b/iBroke/AppDelegate.m @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 19/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import "AppDelegate.h" @@ -52,23 +52,23 @@ @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - + [application setApplicationSupportsShakeToEdit:YES]; self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; _navigationController = [[[UINavigationController alloc] initWithNibName:nil bundle:nil] autorelease]; - + if ([[UINavigationBar class]respondsToSelector:@selector(appearance)]) { [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"navbar.png"] forBarMetrics:UIBarMetricsDefault]; } - + [[[self navigationController] navigationBar] setBarStyle:UIBarStyleBlack]; - + NSString *host = [UserData get:@"hostname"]; if (nil != host) { - [[self navigationController] pushViewController:[[[DisplayBuildsController alloc] + [[self navigationController] pushViewController:[[[DisplayBuildsController alloc] initWithAddress:[NSString stringWithFormat:@"%@/api/json/", host]] autorelease] animated:YES]; } @@ -77,10 +77,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( _mainPageController = [[[SettingsController alloc] initWithNibName:nil bundle:nil] autorelease]; [[self navigationController] pushViewController:_mainPageController animated:YES]; } - + [[self window] setRootViewController:[self navigationController]]; [self displaySplash]; - + // Override point for customization after application launch. [[self window] setBackgroundColor:[UIColor clearColor]]; [self.window makeKeyAndVisible]; @@ -93,10 +93,10 @@ - (void)displaySplash; UIImageView *splash = [[[UIImageView alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; [splash setTag:909]; [splash setImage:[UIImage imageNamed:@"Default"]]; - + [_window addSubview:splash]; [_window bringSubviewToFront:splash]; - + [self delayedHideSplash:splash]; } @@ -108,14 +108,14 @@ - (void)delayedHideSplash:(UIView *)splash; - (void)hideSplash:(UIView *)splash; { [UIView beginAnimations:@"hide splash" context:splash]; - + [UIView setAnimationDuration:.5]; [UIView setAnimationTransition:UIViewAnimationTransitionNone forView:[splash window] cache:YES]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(finishFading:)]; - + [splash setAlpha:0.]; - + [UIView commitAnimations]; } @@ -130,7 +130,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, this method is called instead of applicationWillTerminate: when the user quits. */ } diff --git a/iBroke/main.m b/iBroke/main.m index 8461b3e..24a610c 100644 --- a/iBroke/main.m +++ b/iBroke/main.m @@ -4,27 +4,27 @@ // // Created by Mujtaba Hussain on 19/10/11. -// This code is distributed under the terms and conditions of the MIT license. +// This code is distributed under the terms and conditions of the MIT license. // // Copyright (c) 2011 Mujtaba Hussain // -// Permission is hereby granted, free of charge, to any person obtaining a copy +// Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights +// in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is +// copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. #import