Comments (4)
Do you have a screen shot?
from tapkulibrary.
I think this is not a library issue, but an issue on your side. Can you prove me wrong?
from tapkulibrary.
Sorry for my late response. i thought i would get an email notification in case you would respond to this.
anyway, you can see a screen shot here:
http://i.imagehost.org/0195/Picture_19.png
you can download my relevant code from here:
http://www.megafileupload.com/en/file/206853/Archive-zip.html
As you can see there, i have done nothing special.
thank you very much!
from tapkulibrary.
I ran into a similar issue. I overrode the necessary methods to include the ability to include a frame in the calendar.
#import //UIKit/UIKit.h #import //TapkuLibrary/TapkuLibrary.h @interface TKCalendarMonthView (Framed) - (id) initWithFrame:(CGRect)frame; - (void) drawMonthLabel:(CGRect)rect; - (void) drawDayLabels:(CGRect)rect; - (void) drawRect:(CGRect)rect; @end @implementation TKCalendarMonthView (Framed) - (id)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { // Initialization code self.backgroundColor = [UIColor clearColor]; TKDateInformation info = [[NSDate date] dateInformation]; info.second = info.minute = info.hour = 0; info.day = 1; [self setCurrentMonth:[NSDate dateFromDateInformation:info]]; monthYear = [[NSString stringWithFormat:@"%@ %@",[currentMonth month],[currentMonth year]] copy]; [self setSelectedMonth:currentMonth]; [self loadButtons]; float hgt = CGRectGetHeight(frame) - 44; float wdt = CGRectGetWidth(frame); float oriX = CGRectGetMinX(frame); float oriY = CGRectGetMinY(frame)- 55; //where the top of the calendar will be scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(oriX, oriY, wdt, hgt)]; scrollView.contentSize = CGSizeMake(320,100); [self addSubview:scrollView]; scrollView.scrollEnabled = NO; scrollView.backgroundColor =[UIColor colorWithRed:222/255.0 green:222/255.0 blue:225/255.0 alpha:1]; shadow = [[UIImageView alloc] initWithImage:[UIImage imageFromPath:TKBUNDLE(@"TapkuLibrary.bundle/Images/calendar/shadow.png")]]; deck = [[NSMutableArray alloc] initWithCapacity:3]; [self addSubview:shadow]; [self loadInitialGrids]; } return self; } - (void) drawRect:(CGRect)rect { // Drawing code //[self reload]; [[UIImage imageFromPath:TKBUNDLE(@"TapkuLibrary.bundle/Images/calendar/topbar.png")] drawAtPoint:CGPointMake(0,0)]; [self drawDayLabels:[self bounds]]; [self drawMonthLabel:[self bounds]]; } - (void) drawDayLabels:(CGRect)rect{ // Calendar starting on Monday instead of Sunday (Australia, Europe agains US american calendar) NSArray *days; CFCalendarRef currentCalendar = CFCalendarCopyCurrent(); if (CFCalendarGetFirstWeekday(currentCalendar) == 2) days = [NSArray arrayWithObjects:@"Mon",@"Tue",@"Wed",@"Thu",@"Fri",@"Sat",@"Sun",nil]; else days = [NSArray arrayWithObjects:@"Sun",@"Mon",@"Tue",@"Wed",@"Thu",@"Fri",@"Sat",nil]; CFRelease(currentCalendar); UIFont *f = [UIFont boldSystemFontOfSize:10]; [[UIColor darkGrayColor] set]; CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSaveGState(context); CGContextSetShadowWithColor(context, CGSizeMake(0.0, -1.0), 0.5, [[UIColor whiteColor]CGColor]); int i = 0; for(NSString *str in days){ [str drawInRect:CGRectMake(i * 46, 44-12, 45, 10) withFont:f lineBreakMode:UILineBreakModeWordWrap alignment:UITextAlignmentCenter]; i++; } CGContextRestoreGState(context); } - (void) drawMonthLabel:(CGRect)rect{ if(monthYear != nil){ CGRect r = CGRectInset([self bounds], 55, 8); r.size.height=42; [[UIColor colorWithRed:75.0/255.0 green:92/255.0 blue:111/255.0 alpha:1] set]; [monthYear drawInRect:r withFont:[UIFont boldSystemFontOfSize:20.0] lineBreakMode:UILineBreakModeWordWrap alignment:UITextAlignmentCenter]; } } @end
from tapkulibrary.
Related Issues (20)
- Story board
- Month View and support for width > 320pt HOT 1
- Double tap left/right arrows registered by view behind
- how to get v0.3.5 or the latest version by podspec
- Wrong calendar width in iPhone 6 and 6 plus. HOT 7
- tapkulibrary fail to archive in xcode 5.1.1
- Request: Day Calendar View for iPad HOT 2
- Handle event for TKMultiSwitch HOT 1
- DayView : current time update - Enhancement HOT 1
- Tapku calendar was rejected by apple review for the first time. HOT 3
- TKAlertCenter
- [Calendar Day View] go to specific date
- can not install from cocoasPod? HOT 2
- NSArray index out of length exception
- TapkuLibrary/TapkuLibrary Not Found
- TapkuLibrary.podspec?
- How to change the first day of the week to monday in week view HOT 2
- Events not showing on selecting date
- Support for iPhone X.
- How to run demo project?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tapkulibrary.