At some point in an algorithm I need to compare the float value of a property of a class to a float. So I do this:
if (self.scroller.currentValue <= 0.1) {
}
where currentValue is a float property.
However, when I have equality and self.scroller.currentValue = 0.1 the if statement is not fulfilled and the code not executed! I found o...
Hi everyone,
I'm working on an app that basically revolves around 2D shapes (mostly simple polygons) being dynamically drawn and animated.
I'm looking for a way to easily time my animations. It's basically just moving a vertex to a specified point in a specified time, so just interpolating floats, with all the usual easing parameters. ...
I use and UIWebView in my application to load www.google.com. After the page is loaded, I am not able to click on any of the links. Basically the links dont work. Am I missing something ?
...
I put some text into a UITextView. Now I wanna make the inside text occupy the additional space when device become horizon. But this way only make canvas fill in all the space not the text.
// This method is called by NSNotificationCenter when the device is rotated.
-(void) receivedRotate: (NSNotification*) notification
{
UIDeviceOrien...
I can't seem to get a UISearchBar to position itself from the far left to the far right in the navigation bar. In the -(void)viewDidLoad method, I have the following code:
`UISearchBar *sb = [[UISearchBar alloc] initWithFrame:self.tableView.tableHeaderView.frame];
sb.delegate = self;
self.navigationItem.titleView = sb;
[sb sizeToFit];
[...
Hi,
Does any one know how to display the copyright icon in UILabel text? This is the icon with a circle around c. The html code for it is: © or ©.
I tried the following code:
UILabel *contactInfo = [[UILabel alloc] initWithFrame:CGRectMake(-55,135,420,100)];
contactInfo.text = @"'©):'2009 Nationwide ";
or
contactInfo....
Is there any way to simulate airplane mode in the iPhone Simulator?
...
Core Animation uses a background thread to do it's job. Now the problem is this: I have a heavy calculation going on in the main thread. Core Animation immediately freezes until that calculation is done. And then it continues to finish it's animations. I remember reading in a document that CA has a low priority in processing time, meanin...
Core Animation uses Background Threads. When performing heavy calculations on the main thread, CA stops animating due to its low priority threads. How could Operation Queues help out in such an situation?
...
Hey guys!
I'm messing around with threads a little bit. Now consider this:
I have a main thread. I start a new thread. In it's entry-point method, I want to make a run loop. Now the documentation tells meh that I have to have a input source. Otherwise my run loop exits immediately. bad. okay. but I have no other input source than my perf...
Does anyone know how to create an icon tile layout similar to that of the Application tile view, where I can hold down an icon and sort them. This is also similar to the home screen of the Facebook application.
Is there a special UI control that I can use, or will I have to create this manually? If so, how would I do that?
Help is very...
I have a UITableView instance variable. I want to be able to register my view controller to be the UIScrollViewDelegate for my UITableView controller. I have already tried
tableView.delegate = self;
But when scrolling, my methods
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
- (void)scrollViewDidEndDragging:(UISc...
I have implementing listing page in UITableView.Now i am flicking finger on to the table cell then delete button appear but i want to my custom image insted of delete.Is it possible please give me advise?
...
I have gone through following question.
http://stackoverflow.com/questions/1607155/how-to-change-iphone-uitableview-delete-button-title-while-editing-it
-(NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath{
return @"Sagar";
}
I want a custom image instead of defau...
I wanted to make a ViewController that had some text editing functionality I wanted through out my application. So, I did this.
#import <UIKit/UIKit.h>
@interface superViewController : UIViewController
<UITextFieldDelegate>{
//these are instance variables, remember them?
CGFloat animatedDistance;
}
@end
Then, I add...
I am using a tab bar with a button that calls the current view and does a flip animation to reload it. Once it reloads it performs some operations that alter the view slightly from the last time it was visible.
While the view is flipping, you are able to see the previous view below it.
When I use:
[menuView removeFromSuperview];
the...
Hi guys
I'm attempting to draw polygons on a mapView. What I did was to add a transparent view on the main view, that matches the bounds of the mapView, and I draw over it. When I move the table it's ok, but when I zoom in and out the polygones 'bounce' on the Y axis (latitude) but the x axis is ok. What do you think?
BTW I tried to a...
I'm having trouble creating a UIView (in Interface Builder) that contains a UITableView with some other object, such as a UIButton or UILabel. The UITableView always takes up the maximum amount of space in the UIView, regardless of the size of the UITableView object itself. The File Owner is a standard UITableViewController.
...
I have the following code:
@interface UIAcceleration (Simulation)
- (id) initWithTimestamp:(NSTimeInterval)aTimeStamp
X:(UIAccelerationValue)ax
Y:(UIAccelerationValue)ay
Z:(UIAccelerationValue)az;
@end
@implementation UIAcceleration (Simulation)
-(id)initWithTimestamp:(NSTimeInterval)aTimeStamp
X:...
Hello,
I am trying to get the duration of a video taken with the camera using UIImagePickerController on the iphone, has anyone found a solution to this?
Thanks
Daniel
...