Skip to content

Commit

Permalink
release 0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
normansander committed Oct 2, 2014
1 parent d61a591 commit ce4793d
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 124 deletions.
36 changes: 0 additions & 36 deletions CriticalMass.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -132,39 +132,6 @@ fi
<key>isa</key>
<string>PBXBuildFile</string>
</dict>
<key>944A5C8F19DD840A00F647C7</key>
<dict>
<key>fileEncoding</key>
<string>4</string>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>sourcecode.c.h</string>
<key>path</key>
<string>PLAnnotation.h</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>944A5C9019DD840A00F647C7</key>
<dict>
<key>fileEncoding</key>
<string>4</string>
<key>isa</key>
<string>PBXFileReference</string>
<key>lastKnownFileType</key>
<string>sourcecode.c.objc</string>
<key>path</key>
<string>PLAnnotation.m</string>
<key>sourceTree</key>
<string>&lt;group&gt;</string>
</dict>
<key>944A5C9119DD840A00F647C7</key>
<dict>
<key>fileRef</key>
<string>944A5C9019DD840A00F647C7</string>
<key>isa</key>
<string>PBXBuildFile</string>
</dict>
<key>94709B0019CA705A003E9583</key>
<dict>
<key>fileEncoding</key>
Expand Down Expand Up @@ -367,7 +334,6 @@ fi
<string>94A9C1AF19BF43AB0027C5DC</string>
<string>94F0304919C1E4EC00F86611</string>
<string>94CF089919BDF227009FFF43</string>
<string>944A5C9119DD840A00F647C7</string>
<string>9474656419CA3078005485BD</string>
<string>94CF089319BDEC9C009FFF43</string>
<string>94CF086C19BDEAF2009FFF43</string>
Expand Down Expand Up @@ -563,8 +529,6 @@ fi
<string>942E2D8119C316BD00BF92D7</string>
<string>94709B0019CA705A003E9583</string>
<string>94709B0119CA705A003E9583</string>
<string>944A5C8F19DD840A00F647C7</string>
<string>944A5C9019DD840A00F647C7</string>
</array>
<key>isa</key>
<string>PBXGroup</string>
Expand Down
20 changes: 0 additions & 20 deletions CriticalMass/PLAnnotation.h

This file was deleted.

23 changes: 0 additions & 23 deletions CriticalMass/PLAnnotation.m

This file was deleted.

6 changes: 3 additions & 3 deletions CriticalMass/PLConstants.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ @implementation PLConstants
@end

// Debug
BOOL const kDebug = YES;
BOOL const kDebugEnableTestURL = YES;
BOOL const kDebugEnableTestLocation = YES;
BOOL const kDebug = NO;
BOOL const kDebugEnableTestURL = NO;
BOOL const kDebugEnableTestLocation = NO;
BOOL const kDebugDisableHTTPRequests = NO;
BOOL const kDebugInitialTabIndex = 0;

Expand Down
4 changes: 2 additions & 2 deletions CriticalMass/PLMapViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#import "PLConstants.h"
#import "PLUtils.h"
#import "PLInfoOverlayView.h"
#import "PLAnnotation.h"

@interface PLMapViewController ()

Expand Down Expand Up @@ -55,10 +54,11 @@ - (void)initMap
_map.mapType = MKMapTypeHybrid;
_map.delegate = self;

CLLocationCoordinate2D noLocation;
CLLocationCoordinate2D noLocation = CLLocationCoordinate2DMake(0, 0);
MKCoordinateRegion viewRegion = MKCoordinateRegionMakeWithDistance(noLocation, 10000, 10000);
MKCoordinateRegion adjustedRegion = [_map regionThatFits:viewRegion];
[_map setRegion:adjustedRegion animated:YES];

_map.showsUserLocation = YES;
_map.mapType = MKMapTypeStandard;
_map.showsPointsOfInterest = NO;
Expand Down
3 changes: 2 additions & 1 deletion CriticalMass/PLRulesViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
//

#import <UIKit/UIKit.h>
#import "TTTAttributedLabel.h"

@interface PLRulesViewController : UIViewController
@interface PLRulesViewController : UIViewController<TTTAttributedLabelDelegate>

@end
58 changes: 38 additions & 20 deletions CriticalMass/PLRulesViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,33 @@ - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
_titles = [NSArray arrayWithObjects:
@"Regel 1",
@"Regel 2",
@"Regel 3",
@"Regel 4",
@"Regel 5",
@"Regel 6",
@"Regel 7",
@"Corken!?",
@"Gegenverkehr",
@"Sachte, Keule!",
@"Keine Vollbremsungen",
@"Vorne nur bei Grün",
@"Locker bleiben",
@"Hab Spaß!",
nil];

_texts = [NSArray arrayWithObjects:
@"Schütze Autofahrer vor sich selbst durch Corken",
@"Versuche Team Blau nicht zu provozieren",
@"Verzichte darauf auf der Gegenfahrbahn zu überholen.",
@"Vorne, Nicht rasen!\nHinten, Lücken zufahren!",
@"Keine Vollbremsung, auch wenn mal was verloren geht.",
@"Sei freundlich zu nervösen Autofahrern",
@"Wenn man vorne ist: Nur bei grün fahren",
@"Schütze Autofahrer vor sich selbst durch corken!",
@"Verzichte darauf auf der Gegenfahrbahn zu fahren.",
@"Vorne: nicht rasen!\nHinten, Lücken zufahren!",
@"Wenn's mal nicht anders geht, versuche die anderen per Handzeichen zu warnen.",
@"Wenn du an der Spitze der Mass fährst, musst du warten bis die Ampel auf Grün schaltet.",
@"Lass dich nicht provozieren. Sei freundlich zur Polizei und zu Autofahrern, auch wenn die's nicht sind.",
@"Genieße autofreie Straßen. Fahr ein bisschen mit den Sound-Rädern mit. Check die Bikes deiner Mitfahrer aus. Quatsch Autofahrer, Passanten, Mitfahrer an. Hab Spaß!",
nil];

_images = [NSArray arrayWithObjects:
@"Corken",
@"Police",
@"WrongLane",
@"Slowly",
@"Brake",
@"Friendly",
@"Green",
@"Friendly",
@"Pose",
nil];
}
return self;
Expand All @@ -62,7 +62,7 @@ - (void)viewDidLoad

[self.view setBackgroundColor:[UIColor whiteColor]];

AccordionView *accordion = [[AccordionView alloc] initWithFrame:CGRectMake(0, 40, self.view.frame.size.width, self.view.frame.size.height-90)];
AccordionView *accordion = [[AccordionView alloc] initWithFrame:CGRectMake(0, 40, self.view.frame.size.width, self.view.frame.size.height-120)];

[self.view addSubview:accordion];

Expand All @@ -73,6 +73,18 @@ - (void)viewDidLoad
[accordion setNeedsLayout];
[accordion setAllowsMultipleSelection:NO];
[accordion setAllowsEmptySelection:YES];


// add link to cm hamburg
TTTAttributedLabel *label = [[TTTAttributedLabel alloc]initWithFrame:CGRectMake(10, self.view.frame.size.height-80, self.view.frame.size.width-20, 30)];
label.font = [UIFont systemFontOfSize:12.0f];
NSString *labelText = @"Bilder von criticalmass-hh.de (CC BY-NC-ND 3.0 DE)";
label.text = labelText;
NSRange range = [labelText rangeOfString:@"criticalmass-hh.de"];
[label addLinkToURL:[NSURL URLWithString:@"open-cmhamburg"] withRange:range];
label.delegate = self;

[self.view addSubview:label];
}

- (void)didReceiveMemoryWarning
Expand All @@ -96,13 +108,14 @@ - (UIButton*)getHeader:(NSInteger)index

- (UIView*)getView:(NSInteger)index
{
UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 220)];
UILabel *label = [[UILabel alloc]initWithFrame: CGRectMake(10, 0, self.view.frame.size.width-20, 50)];
UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 250)];
UILabel *label = [[UILabel alloc]initWithFrame: CGRectMake(10, 0, self.view.frame.size.width-20, 80)];
label.font = [UIFont systemFontOfSize:14.0f];
label.lineBreakMode = NSLineBreakByWordWrapping;
label.numberOfLines = 0;
label.text = _texts[index];

UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 50, self.view.frame.size.width, 150)];
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 80, self.view.frame.size.width, 150)];
imageView.image = [UIImage imageNamed:_images[index]];
imageView.contentMode = UIViewContentModeScaleAspectFit;

Expand All @@ -112,5 +125,10 @@ - (UIView*)getView:(NSInteger)index
return view;
}

- (void)attributedLabel:(TTTAttributedLabel *)label didSelectLinkWithURL:(NSURL *)url {

[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://www.criticalmass-hh.de"]];
}


@end
39 changes: 21 additions & 18 deletions CriticalMass/PLSettingsTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
}else if(section == 1){
return 2;
}else if(section == 2){
return 3;
return 4;
}else if(section == 3){
return 2;
}
Expand Down Expand Up @@ -86,17 +86,20 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
}
}else if (indexPath.section == 2){
if(indexPath.row == 0){
cell.textLabel.text = @"Critical Mass Berlin";
cell.detailTextLabel.text = @"www.criticalmass-berlin.org";
}else if(indexPath.row == 1){
cell.textLabel.text = @"GitHub Open Source";
cell.detailTextLabel.text = @"www.github.com/headione/criticalmass-berlin";
}else if(indexPath.row == 2){
cell.textLabel.text = @"Logo Design";
cell.detailTextLabel.text = @"www.thomas-hollnack.de";
}else if(indexPath.row == 3){
cell.textLabel.text = @"Programmierung";
cell.detailTextLabel.text = @"www.pokuslabs.com";
}
if(indexPath.row == 1){
cell.textLabel.text = @"Github Open Source";
cell.detailTextLabel.text = @"www.github.com/headione/criticalmass-berlin";
}
if(indexPath.row == 2){
cell.textLabel.text = @"Website";
cell.detailTextLabel.text = @"www.criticalmass-berlin.org";
}


}else if (indexPath.section == 3){
if(indexPath.row == 0){
cell.imageView.image = [UIImage imageNamed:@"Donate"];
Expand All @@ -112,20 +115,20 @@ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *
if (indexPath.section == 1){
if(indexPath.row == 0){
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"https://www.facebook.com/pages/Critical-Mass-Berlin/74806304846"]];
}
if(indexPath.row == 1){
}else if(indexPath.row == 1){
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"https://twitter.com/cmberlin"]];
}
}else if (indexPath.section == 2){
}else if(indexPath.section == 2){
if(indexPath.row == 0){
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://www.thomas-hollnack.de"]];
}
if(indexPath.row == 1){
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"https://github.com/headione/criticalmass-berlin"]];
}
if(indexPath.row == 2){
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://www.criticalmass-berlin.org"]];
}else if(indexPath.row == 1){
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"https://github.com/headione/criticalmass-berlin"]];
}else if(indexPath.row == 2){
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://www.thomas-hollnack.de"]];
}else if(indexPath.row == 3){
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://www.pokuslabs.com"]];
}

}else if (indexPath.section == 3){
if(indexPath.row == 0){
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TQGCAK3G3Z9GQ"]];
Expand Down
3 changes: 2 additions & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ xcodeproj 'CriticalMass.xcodeproj'

pod 'AFNetworking'
pod 'NSString-Hashes'
pod 'AccordionView'
pod 'AccordionView'
pod 'TTTAttributedLabel'
3 changes: 3 additions & 0 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@ PODS:
- AFNetworking/NSURLConnection
- AFNetworking/NSURLSession
- NSString-Hashes (1.2.2)
- TTTAttributedLabel (1.10.1)

DEPENDENCIES:
- AccordionView
- AFNetworking
- NSString-Hashes
- TTTAttributedLabel

SPEC CHECKSUMS:
AccordionView: 73a85aa6a5355e53c38f9f01aa9e057ab0c9f00a
AFNetworking: 0aabc6fae66d6e5d039eeb21c315843c7aae51ab
NSString-Hashes: ddf6e856e93d3c83c5d4ef8fcdea2a96ed77c6bc
TTTAttributedLabel: 94bb04f1e005616002dd2cee0262a0082e533627

COCOAPODS: 0.34.1

0 comments on commit ce4793d

Please sign in to comment.