iOS 6 - How can I get the "release to refresh" animation thing? like in mail? - iphone

In mail app, we can now drag the view down and release to refresh, like shown in the picture below.
Is this a standard thing I can get from SDK?
Thanks

Use the new iOS6 UIRefreshControl class to do that.
yourUITableViewController.refreshControl = [[[UIRefreshControl alloc] init] autorelease];
[yourUITableViewController.refreshControl addTarget:yourTableView action:#selector(reloadData) forControlEvent:UIControlEventValueChanged];

If u need customized refresh control,
ODRefreshControl
thanks,
Naveen Shan

Related

Using popover control in iPhone

pop = [[UIPopoverController alloc] initWithContentViewController:popoverView];
pop.delegate = self; //optional
CGSize size = CGSizeMake(300, 100); // size of view in popover…V2
pop.popoverContentSize = size;
[pop presentPopoverFromRect:control.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
Youtube link: http://www.youtube.com/watch?v=1iykxemuxbk
It works fine in simulator, but crashes when running on iPhone.
I can easily get so many articles to implement on iPad, but on iPhone couldn't find a fruitful one. Plz help
UIPopOverController isn't available for iPhone. ONLY iPad.
UIPopOverController will not work for iPhone it will work on Ipad only
If you want to simulate a popover look-alike (e.g. Facebook app), on the iPhone, you will have to code it from scratch using UIViews and custom graphics.
As others said, the popover API is iPad-only.
A popover-like open source project that works on iPhone:
here it is
Try using WEPopover framework. Here is the link https://github.com/werner77/WEPopover
If you really want to use popover in iphone then try this library. This is pretty cool. I integrated with my ios app.
Custom popover controller for iphone

Need Tutorial of UAmodalPanel

I have seen a very nice sample code for UAmodalPanel as the link below. But after i downloaded the code, I have no idea how it works. Does anyone have any idea and know if there is any tutorial for that?
Many Thanks.
UAModalPanel is quite simple to understand. If you don't want to use blocks or delegates, simply create an instance of the panel and call -showFromPoint: like so:
//create panel instance
UAExampleModalPanel *modalPanel = [[[UAExampleModalPanel alloc] initWithFrame:self.view.bounds title:#"Example"] autorelease];
// Add the panel to our view
[self.view addSubview:modalPanel];
// Show the panel from the center of the screen
[modalPanel showFromPoint:self.view.center];

Change color of UIAlertView in UILocalNotification

I have implemented UILocalNotification in my application it is working fine but i want to customize the alert view shown ie change the color of UIAlertview is there any way to implement it.Please help..
Thanks
Maybe you could use the GRAlertView, which you find here: GRAlertView github page

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 app Action Button

I need to add an action button in my iPhone application. When that one is clicked the UIActionSheet with buttons need to be popped up.
Can any one tell me how to add an action button? - means is there any in built action button for iPhone app? or do we need to create a new button with image?
Thanks in advance!
Assuming this is in a view controller, you can do something like:
- (void)viewDidLoad
{
UIBarButtonItem *actionButton = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemAction
target:self
action:#selector(methodThatShowsSheet)];
self.navigationItem.rightBarButtonItem = actionButton;
[actionButton release];
}
(Pardon the weird indentation to make it fit in a reasonable width (I normally just let Xcode wrap-indent everything automatically)).
See Nick Veys' answer for how to implement methodThatShowsSheet.
You need to hook up the action from the button you've decided will present this action sheet to code that shows it.
See the Apple Documentation on UIActionSheet for help on doing that.
I'm not sure I understnd your question but UIKit includes the UIButton class which will automatically send a message (specified by you) to an object (also specified by you). You can create a UIButton i nInterface builder or programatically.
Without more details on whay you actually want to do or why you're finding it difficult,m it's difficult to be more precise.