Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing issues with Tapku init. Hooking up basic event details view.

  • Loading branch information...
commit 93441b9cb7d2cf9739f1c24f3c82eee063a95138 1 parent 79ab23a
@jsakuda jsakuda authored
View
6 HI Capacity.xcodeproj/project.pbxproj
@@ -17,6 +17,7 @@
09A445A21567A6CD00634C53 /* UIImage+TKCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 09A445991567A6CD00634C53 /* UIImage+TKCategory.m */; };
09A445A31567A6CD00634C53 /* UIView+TKCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 09A4459B1567A6CD00634C53 /* UIView+TKCategory.m */; };
09A445B11568645D00634C53 /* CalendarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 09A445B01568645D00634C53 /* CalendarViewController.m */; };
+ 09F56C69157B73B30028ACEB /* EventDetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 09F56C68157B73B30028ACEB /* EventDetailsViewController.m */; };
A39E33ED155FA29F0076ED6D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A39E33EC155FA29F0076ED6D /* UIKit.framework */; };
A39E33EF155FA29F0076ED6D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A39E33EE155FA29F0076ED6D /* Foundation.framework */; };
A39E33F1155FA29F0076ED6D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A39E33F0155FA29F0076ED6D /* CoreGraphics.framework */; };
@@ -76,6 +77,8 @@
09A4459B1567A6CD00634C53 /* UIView+TKCategory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+TKCategory.m"; sourceTree = "<group>"; };
09A445AF1568645D00634C53 /* CalendarViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CalendarViewController.h; sourceTree = "<group>"; };
09A445B01568645D00634C53 /* CalendarViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CalendarViewController.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
+ 09F56C67157B73B30028ACEB /* EventDetailsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventDetailsViewController.h; sourceTree = "<group>"; };
+ 09F56C68157B73B30028ACEB /* EventDetailsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EventDetailsViewController.m; sourceTree = "<group>"; };
A39E33E8155FA29F0076ED6D /* HI Capacity.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HI Capacity.app"; sourceTree = BUILT_PRODUCTS_DIR; };
A39E33EC155FA29F0076ED6D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
A39E33EE155FA29F0076ED6D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -233,6 +236,8 @@
C8407A6F15663806001CAB68 /* PostContentViewController.m */,
09A445AF1568645D00634C53 /* CalendarViewController.h */,
09A445B01568645D00634C53 /* CalendarViewController.m */,
+ 09F56C67157B73B30028ACEB /* EventDetailsViewController.h */,
+ 09F56C68157B73B30028ACEB /* EventDetailsViewController.m */,
);
path = "HI Capacity";
sourceTree = "<group>";
@@ -438,6 +443,7 @@
09A445A31567A6CD00634C53 /* UIView+TKCategory.m in Sources */,
09A445B11568645D00634C53 /* CalendarViewController.m in Sources */,
091E407815731F8900EE1F9E /* Event.m in Sources */,
+ 09F56C69157B73B30028ACEB /* EventDetailsViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
36 HI Capacity/CalendarViewController.m
@@ -10,6 +10,7 @@
#import "NSDate+TKCategory.h"
#import "HTTPEngine.h"
#import "Event.h"
+#import "EventDetailsViewController.h"
@interface CalendarViewController ()
@@ -20,7 +21,9 @@ @implementation CalendarViewController
@synthesize dataArray, dataDictionary;
- (id) initWithCoder:(NSCoder *)aDecoder {
- return [super initWithSunday:YES];
+ self = [super initWithCoder:aDecoder];
+ [self setUseSundayFirst:YES];
+ return self;
}
- (void)viewDidLoad{
@@ -29,7 +32,9 @@ - (void)viewDidLoad{
}
- (void)viewWillAppear:(BOOL)animated {
-// [[[self navigationController] navigationBar] setHidden:YES];
+ // Deselect any selected table row there may be
+ [[super tableView] deselectRowAtIndexPath:[[super tableView] indexPathForSelectedRow] animated:animated];
+ [super viewWillAppear:animated];
}
- (NSArray*) calendarMonthView:(TKCalendarMonthView*)monthView marksFromDate:(NSDate*)startDate toDate:(NSDate*)lastDate {
@@ -100,10 +105,10 @@ - (NSArray*) calendarMonthView:(TKCalendarMonthView*)monthView marksFromDate:(NS
- (void) calendarMonthView:(TKCalendarMonthView*)monthView didSelectDate:(NSDate*)date{
// CHANGE THE DATE TO YOUR TIMEZONE
- TKDateInformation info = [date dateInformationWithTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
- NSDate *myTimeZoneDay = [NSDate dateFromDateInformation:info timeZone:[NSTimeZone systemTimeZone]];
-
- NSLog(@"Date Selected: %@",myTimeZoneDay);
+// TKDateInformation info = [date dateInformationWithTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
+// NSDate *myTimeZoneDay = [NSDate dateFromDateInformation:info timeZone:[NSTimeZone systemTimeZone]];
+//
+// NSLog(@"Date Selected: %@",myTimeZoneDay);
[self.tableView reloadData];
}
@@ -137,6 +142,12 @@ - (UITableViewCell *) tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndex
}
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+ // trigger the segue programatically, the table is not in the storyboard because it is from the Tapku lib
+
+ [self performSegueWithIdentifier:@"PushEventDetails" sender:self];
+}
+
- (NSMutableArray *) getEventsForDate:(NSDate *)date from:(NSMutableArray *)queriedEvents {
NSMutableArray *events = [[NSMutableArray alloc] init];
@@ -157,4 +168,17 @@ - (NSMutableArray *) getEventsForDate:(NSDate *)date from:(NSMutableArray *)quer
return events;
}
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
+{
+ if ([[segue identifier] isEqualToString:@"PushEventDetails"])
+ {
+ NSDate *selectedDate = [[self monthView] dateSelected];
+ NSMutableArray *events = [dataDictionary objectForKey:selectedDate];
+ NSInteger selectedIndex = [[[self tableView] indexPathForSelectedRow] row];
+
+ EventDetailsViewController *eventDetailsViewController = [segue destinationViewController];
+ [eventDetailsViewController setEvent:[events objectAtIndex:selectedIndex]];
+ }
+}
+
@end
View
19 HI Capacity/EventDetailsViewController.h
@@ -0,0 +1,19 @@
+//
+// EventDetailsViewController.h
+// HI Capacity
+//
+// Created by Julie Ann Sakuda on 6/3/12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "Event.h"
+
+@interface EventDetailsViewController : UIViewController
+
+@property (strong, nonatomic) Event *event;
+
+@property (weak, nonatomic) IBOutlet UILabel *eventSummaryLabel;
+@property (weak, nonatomic) IBOutlet UILabel *eventTimeLabel;
+@property (weak, nonatomic) IBOutlet UITextView *eventDescText;
+@end
View
62 HI Capacity/EventDetailsViewController.m
@@ -0,0 +1,62 @@
+//
+// EventDetailsViewController.m
+// HI Capacity
+//
+// Created by Julie Ann Sakuda on 6/3/12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import "EventDetailsViewController.h"
+
+@interface EventDetailsViewController ()
+
+@end
+
+@implementation EventDetailsViewController
+
+@synthesize event;
+@synthesize eventSummaryLabel;
+@synthesize eventTimeLabel;
+@synthesize eventDescText;
+
+- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
+{
+ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
+ if (self) {
+ // Custom initialization
+ }
+ return self;
+}
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+ // Do any additional setup after loading the view.
+
+ // Set the title of the view
+ [self setTitle:[event summary]];
+ [[self eventSummaryLabel] setText:[event summary]];
+ [[self eventDescText] setText:[event description]];
+
+ // Create the date/time text
+ NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
+ [formatter setDateFormat:@"EEEE, MMMM d yyyy h:mm z"];
+ [formatter setTimeZone:[NSTimeZone systemTimeZone]];
+ [[self eventTimeLabel] setText:[formatter stringFromDate:[event startTime]]];
+}
+
+- (void)viewDidUnload
+{
+ [self setEventSummaryLabel:nil];
+ [self setEventDescText:nil];
+ [self setEventTimeLabel:nil];
+ [super viewDidUnload];
+ // Release any retained subviews of the main view.
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
+{
+ return (interfaceOrientation == UIInterfaceOrientationPortrait);
+}
+
+@end
View
4 HI Capacity/HTTPEngine.m
@@ -56,10 +56,10 @@ -(MKNetworkOperation*) eventsFrom:(NSDate *)startDate
}];
if([completedOperation isCachedResponse]) {
- //NSLog(@"Data from cache %@", responseDictionary);
+// NSLog(@"Data from cache %@", responseDictionary);
}
else {
- //NSLog(@"Data from server %@", responseDictionary);
+// NSLog(@"Data from server %@", responseDictionary);
}
completionBlock(events);
}
View
128 HI Capacity/en.lproj/MainStoryboard_iPhone.storyboard
@@ -6,20 +6,71 @@
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1181"/>
</dependencies>
<scenes>
+ <!--Navigation Controller - Item-->
+ <scene sceneID="BQ0-JL-NQh">
+ <objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="F4M-Ke-0A4" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ <navigationController definesPresentationContext="YES" id="d23-Hb-Ml8" sceneMemberID="viewController">
+ <tabBarItem key="tabBarItem" title="Item" id="W9Y-PJ-3km"/>
+ <navigationBar key="navigationBar" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="57m-sw-xcD">
+ <autoresizingMask key="autoresizingMask"/>
+ </navigationBar>
+ <connections>
+ <segue destination="cgN-mC-IbB" kind="relationship" relationship="rootViewController" id="hbJ-dx-5Rj"/>
+ </connections>
+ </navigationController>
+ </objects>
+ <point key="canvasLocation" x="-142" y="505"/>
+ </scene>
<!--View Controller - Photos-->
<scene sceneID="YfF-GG-KNf">
<objects>
<placeholder placeholderIdentifier="IBFirstResponder" id="M8V-fL-7KU" userLabel="First Responder" sceneMemberID="firstResponder"/>
<viewController id="cgN-mC-IbB" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="eUW-DV-8gj">
- <rect key="frame" x="0.0" y="20" width="320" height="411"/>
+ <rect key="frame" x="0.0" y="64" width="320" height="372"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="VIu-Mc-FzG">
+ <rect key="frame" x="178" y="42" width="122" height="37"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+ <state key="normal" title="Work asshole">
+ <color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
+ <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <state key="highlighted">
+ <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+ </state>
+ <connections>
+ <segue destination="YkO-u4-zfG" kind="push" identifier="dfgsdfg" id="fYk-Z1-gqd"/>
+ </connections>
+ </button>
+ </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<tabBarItem key="tabBarItem" title="Photos" id="yat-oq-zuT"/>
+ <toolbarItems/>
+ <navigationItem key="navigationItem" id="jPB-lx-ND5"/>
+ <simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
+ </viewController>
+ </objects>
+ <point key="canvasLocation" x="246" y="523"/>
+ </scene>
+ <!--View Controller-->
+ <scene sceneID="1aF-nV-kHG">
+ <objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="Nx7-nQ-WL6" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ <viewController id="YkO-u4-zfG" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="i8u-d9-MDG">
+ <rect key="frame" x="0.0" y="64" width="320" height="372"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
+ <navigationItem key="navigationItem" id="8M5-GF-FD2"/>
</viewController>
</objects>
- <point key="canvasLocation" x="293" y="523"/>
+ <point key="canvasLocation" x="686" y="523"/>
</scene>
<!--Navigation Controller - Posts-->
<scene sceneID="LLv-Vl-PKR">
@@ -139,7 +190,7 @@
<connections>
<segue destination="2PG-ux-Xm6" kind="relationship" relationship="viewControllers" id="Ddd-8C-zKX"/>
<segue destination="j4b-DO-kFC" kind="relationship" relationship="viewControllers" id="4y6-vY-NPg"/>
- <segue destination="cgN-mC-IbB" kind="relationship" relationship="viewControllers" id="euB-Wx-Uaw"/>
+ <segue destination="d23-Hb-Ml8" kind="relationship" relationship="viewControllers" id="YJa-En-huq"/>
</connections>
</tabBarController>
</objects>
@@ -149,38 +200,93 @@
<scene sceneID="GCJ-Iz-yen">
<objects>
<placeholder placeholderIdentifier="IBFirstResponder" id="Gs4-ee-V3z" userLabel="First Responder" sceneMemberID="firstResponder"/>
- <navigationController definesPresentationContext="YES" hidesBottomBarWhenPushed="YES" id="j4b-DO-kFC" sceneMemberID="viewController">
+ <navigationController definesPresentationContext="YES" id="j4b-DO-kFC" sceneMemberID="viewController">
<tabBarItem key="tabBarItem" title="Calendar" id="OQ9-gF-vQQ"/>
<navigationBar key="navigationBar" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="yFg-5Z-pdc">
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
- <segue destination="lgc-69-1Cm" kind="relationship" relationship="rootViewController" id="6cS-vS-04S"/>
+ <segue destination="aeK-4w-dFd" kind="relationship" relationship="rootViewController" id="4cM-jx-iec"/>
</connections>
</navigationController>
</objects>
<point key="canvasLocation" x="293" y="-70"/>
</scene>
<!--Calendar View Controller-->
- <scene sceneID="aoh-cy-aBN">
+ <scene sceneID="aRt-ae-TGo">
+ <objects>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="cQF-sp-TQM" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ <viewController id="aeK-4w-dFd" customClass="CalendarViewController" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="cwg-Nf-Ylo">
+ <rect key="frame" x="0.0" y="64" width="320" height="367"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+ </view>
+ <navigationItem key="navigationItem" id="L1R-i1-1nr"/>
+ <connections>
+ <segue destination="N5c-iw-DaK" kind="push" identifier="PushEventDetails" id="br5-Sk-bIR"/>
+ </connections>
+ </viewController>
+ </objects>
+ <point key="canvasLocation" x="691" y="-70"/>
+ </scene>
+ <!--Event Details View Controller-->
+ <scene sceneID="iU5-ix-6dy">
<objects>
- <placeholder placeholderIdentifier="IBFirstResponder" id="rq9-ge-y8w" userLabel="First Responder" sceneMemberID="firstResponder"/>
- <viewController id="lgc-69-1Cm" customClass="CalendarViewController" sceneMemberID="viewController">
- <view key="view" contentMode="scaleToFill" id="aVW-1W-iJU">
+ <placeholder placeholderIdentifier="IBFirstResponder" id="trK-cS-Hgb" userLabel="First Responder" sceneMemberID="firstResponder"/>
+ <viewController id="N5c-iw-DaK" customClass="EventDetailsViewController" sceneMemberID="viewController">
+ <view key="view" contentMode="scaleToFill" id="9v6-tw-Iwa">
<rect key="frame" x="0.0" y="64" width="320" height="367"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <subviews>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Label" lineBreakMode="wordWrap" numberOfLines="2" baselineAdjustment="alignBaselines" minimumFontSize="14" id="zPp-Uh-Nhx">
+ <rect key="frame" x="13" y="10" width="295" height="50"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" id="xf0-ps-oiW">
+ <rect key="frame" x="13" y="84" width="295" height="277"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+ <fontDescription key="fontDescription" type="system" pointSize="14"/>
+ <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+ <dataDetectorType key="dataDetectorTypes" link="YES" calendarEvent="YES"/>
+ </textView>
+ <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="10" id="2sd-8b-Ijk">
+ <rect key="frame" x="13" y="60" width="295" height="21"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <fontDescription key="fontDescription" type="system" pointSize="15"/>
+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+ <nil key="highlightedColor"/>
+ </label>
+ </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
- <navigationItem key="navigationItem" id="egt-Kq-fup"/>
+ <navigationItem key="navigationItem" id="WV4-8g-mVK"/>
+ <connections>
+ <outlet property="eventDescText" destination="xf0-ps-oiW" id="ceq-Pq-ukZ"/>
+ <outlet property="eventSummaryLabel" destination="zPp-Uh-Nhx" id="ELo-PQ-b5N"/>
+ <outlet property="eventTimeLabel" destination="2sd-8b-Ijk" id="6rv-Kt-JzK"/>
+ </connections>
</viewController>
</objects>
- <point key="canvasLocation" x="701" y="-70"/>
+ <point key="canvasLocation" x="1087" y="-70"/>
</scene>
</scenes>
<classes>
<class className="CalendarViewController" superclassName="TKCalendarMonthTableViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/CalendarViewController.h"/>
</class>
+ <class className="EventDetailsViewController" superclassName="UIViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/EventDetailsViewController.h"/>
+ <relationships>
+ <relationship kind="outlet" name="eventDescText" candidateClass="UITextView"/>
+ <relationship kind="outlet" name="eventSummaryLabel" candidateClass="UILabel"/>
+ <relationship kind="outlet" name="eventTimeLabel" candidateClass="UILabel"/>
+ </relationships>
+ </class>
<class className="PostContentViewController" superclassName="UIViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/PostContentViewController.h"/>
<relationships>
View
1  HI Capacity/main.m
@@ -16,3 +16,4 @@ int main(int argc, char *argv[])
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
+
View
1  vendor/TapkuLibrary/TKCalendarMonthViewController.h
@@ -50,6 +50,7 @@
*/
- (id) initWithSunday:(BOOL)sundayFirst;
+@property (nonatomic) BOOL useSundayFirst;
/** Returns the month view managed by the controller object. */
@property (strong,nonatomic) TKCalendarMonthView *monthView;
View
7 vendor/TapkuLibrary/TKCalendarMonthViewController.m
@@ -33,20 +33,21 @@
@interface TKCalendarMonthViewController () {
- BOOL _sundayFirst;
+
}
@end
@implementation TKCalendarMonthViewController
@synthesize monthView = _monthView;
+@synthesize useSundayFirst;
- (id) init{
return [self initWithSunday:YES];
}
- (id) initWithSunday:(BOOL)sundayFirst{
if(!(self = [super init])) return nil;
- _sundayFirst = sundayFirst;
+ [self setUseSundayFirst:sundayFirst];
return self;
}
@@ -62,7 +63,7 @@ - (void) viewDidUnload {
- (void) loadView{
[super loadView];
- _monthView = [[TKCalendarMonthView alloc] initWithSundayAsFirst:_sundayFirst];
+ _monthView = [[TKCalendarMonthView alloc] initWithSundayAsFirst:useSundayFirst];
_monthView.delegate = self;
_monthView.dataSource = self;
[self.view addSubview:_monthView];
Please sign in to comment.
Something went wrong with that request. Please try again.