Show Specific dates in Tapku library Calender - iphone

I have implemented Tapku Library calender in my olympic based iphone app. I want to enable a set of dates(Olympic dates) on it, so that user can only select those dates.
Don't know how to implement it in my app.

You need to use following delegate method for get selected date
- (void)calendarMonthView:(TKCalendarMonthView *)monthView didSelectDate:(NSDate *)d
{
NSLog(#"calendarMonthView didSelectDate");
}

Related

Want add reminder in iphone app

I want to add reminder functionality in my iphone app, I came to know that I need to use local notification but I don't want to use it.
So is there any way to fulfill my need ??
UILocalNotification is a nice thing but if you don't want to use it you can make use of EventKit that gives you access to device's reminders.
Create EventStore object with reminder type.
EKEventStore *store = [[EKEventStore alloc] initWithAccessToEntityTypes:EKEntityMaskReminder];
Get access from user.
[store requestAccessToEntityType:EKEntityTypeReminder completion:^(BOOL granted, NSError *error) {
// handle access here }];
use this function to create reminders
+ (EKReminder *)reminderWithEventStore:(EKEventStore *)eventStore
Refer documentation for more details .
There is an another way, other than using the local notification, see my answer posted hear in this u set an event in the calendar and set the repeat settings by setting alarm.
Hope this helps you.
If you don't want to use UILocal notification use EKEventStore for adding reminders in iPhone Calendar. You can add your alarm, events etc in iPhone Calendar.
But remember it supports only iOS 6.0 or later. you cannot change in iPhone calendar in lower iOS6.0 version
Follow these links:
Link-1
Link-2

Xcode - Showing month names in portuguese when using UIDatePicker

I am using the UIDatePicker and I'd like to show month names in Brazilian Portuguese. I've already tried to use the timeZone property, no success though.
Here is my code:
UIDatePicker *pv = [[UIDatePicker alloc] initWithFrame:CGRectMake(0,0,320,216)];
pv.datePickerMode = UIDatePickerModeDate;
pv.timeZone = [NSTimeZone timeZoneWithName:#"America/Sao_Paulo"];
Does anybody would help me?
Set the locale property on the picker to the locale you want, like this:
pv.locale = [[[NSLocale alloc] initWithLocaleIdentifier:#"pt_BR"] autorelease];
It should configure itself correctly. You may need to check [NSLocale availableLocaleIdentifiers] to determine if the locale you want is available/installed.
Clarification needed. Do you only want to set the date picker to Portuguese, and keep the rest of the app in the user's default language?
Normally the datepicker changes language with the user following the settings under settings/general/international. The datepicker will automatically adjust to the user's desired language, so you don't have to localize it directly.
You don't have to do anything. As soon as the iPhone is set to the proper locale, the UIDatePicker will show the proper values for you. That's why locale related methods and properties are deprecated. It relies on system configuration.

Prevent UIDatePicker from defaulting to current year

I have got a UIDatePicker to pick up Date of Birth. If someone doesn't select a year it defaults to current year. How can I prevent datepicker from defaulting to the current year? Please help.
Thanks
Sonia
It has to default to some year. You could set a maximum date though (like 1 year ago), and then set the date of the UIDatePicker to an invalid date (like today). Then just don't let the user continue if they haven't changed the year to a valid year.
According to The UIDatePicker Class Reference You can simply change the Date Property's value and thus changing the default value - wich is the control's creation date
Regarding your comment about a message - have you tried something like
UIAlertView *alert=[[UIAlertView alloc]initWithTitle:#"Warning" message:#"Please Enter correct birthday year" delegate:self cancelButtonTitle:#"ok" otherButtonTitles:nil];
Alert views are pop-up views that appear over the current view on the iPhone.
You may find iPhone Development 101 - UIAlertView informative
Before showing the date picker, you could call upon the
- (void)setDate:(NSDate *)date animated:(BOOL)animated;
method with the required date and the UIDatePicker will display that date when it comes on screen.

How to add Events in iPhone calendar application using our iphone application.

How to add Event in iPhone Calendar. I just want to add events in iPhone calendar using my application and wants to set pushnotification for perticuler event. Please help me out on this. Thank you.
To create an Event programmatically, you would use EventKit, more specifically the provided EKEventEditViewController. See the Apple documentation for an explanation and sample code.
In iOS 4.0+, you would also be able to access that controller without writing any EventKit code. To do that, use a UITextView configured with dataDetectorTypes = UIDataDetectorTypeCalendarEvent. The UITextView will automatically convert strings representing formatted dates, days of the week, etc. - to clickable URLs that handle the creation of events.
Please refer to the Apple iOS documentation for the rest of your question. If there is anything specific that doesn't work in your case, please post some code, show us what you have tried already, etc.
you can use this code
EKEventStore *es = [[EKEventStore alloc] init];
EKEventEditViewController *controller = [[EKEventEditViewController alloc] init];
controller.eventStore = es;
controller.editViewDelegate = self;
[self presentModalViewController:controller animated:YES];
[controller release];

iPhone Timer Picker

Is it possible to make this go as granular as seconds without having to write a custom picker?
You have to write a custom picker to enter seconds.
UIDatePicker is constrained to the following Date Picker Modes as defined in UIDatePicker, none of which displays seconds:
typedef enum {
UIDatePickerModeTime,
UIDatePickerModeDate,
UIDatePickerModeDateAndTime,
UIDatePickerModeCountDownTimer
} UIDatePickerMode;
Cheers, niels