Hi,
I want some help on UIAccelerometer class. I want to find some way to find out or distinguish when I wave iphone device from right-to-left and the left-to-right. I am getting x,y,z values as well as interval value. I am also getting velocity and distance calculated from normal physics rule.
Distance = (prevDist + sqrt(pow((prevx - ...
The iPad virtual keyboard will disappear in one of (at least) these 3 circumstances:
If the control (say, a UITextField) programmatically resigns first responder.
If the user taps the "dismiss keyboard" button in the lower right.
If the user connects to the USB/keyboard dock peripheral.
In all cases, I get the UIKeyboardWillHideNotif...
I'm developing a graphing application that on the main navigation/tab view displays a UIView that renders a graph using openGL. Beneath that view is a UITableView that displays the list of elements on the graph, and an add button.
Occasionally, when the user clicks on another tab, and then returns to the graph view tab, the table view d...
I am writing an app that needs to display a series of approximately 10-20 'views'. I have 4 view controllers and nibs that I would like to use. Each view has a forward and back button on it and the views should slide in either from the right or the left depending on the button pushed. I want to be able to reuse the nibs and controller...
My app has a thread that does some time consuming job for more than a minute and the app consumes around 6.8MB of memory. I receive a memory warning after sometime and then it gets killed. There is nothing that I can release, and I am using not even 7MB of memory...driving me crazy...any advice please?
...
Hello,
I've created a custom view by code, I add the view in IB and select the class that I want.
This works perfectly.
But now, I want to show in IB how the view looks: it has one UILabel, one UITextField, one UIImage, etc. etc.
So I've created an empty .xib and added there the desired controls.
How can I add this view to my main v...
I want my accessory to be in a slightly different place than normal. Is it possible?
This code has no effect:
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
cell.accessoryView.frame = CGRectMake(5.0, 5.0, 5.0, 5.0);
...
Hi,
I'm trying to understand how UIScrollView works for zooming.
I was trying to rotate a UIImageView within a zoomed UIScrollView and I ended up with weird sizes, my centering in the scrollview not working anymore.
I solved the problem by setting the zoomScale to 1.0 before doing the rotation, and then by resetting it back to the pr...
Hello. I'd like to add a Calendar picker control to my iPad app that is similar in appearence and functionality to the Calendar picker control in the upper right corner of the native Calendar app on the iPad.
I've looked into a couple of the 3rd party frameworks that have Calendar controls like this (such as the Tapku Library), but beca...
I have a UITextField that has been added to my view in Interface Builder. My question is: is there a way I can programatically set its delegate from within Xcode? I know that I can connect up the delegate in IB by dragging a connection from UITextField>Delegate to my viewController which implements textFieldShouldReturn:
Just curious as...
What I am trying to do: I want three buttons side-by-side in a tableviewcell just like in Contacts app.
What I've done: I have a custom tableviewcell with three uibuttons in it. I've set the background color of the tableviewcell to be transparent.
What I can't figure out: The tableviewcell border is still there! Everything looks great ...
Our CEO wants our iPhone app's icons to look correct (ie not scaled) on both the iPad and iPhone. He does not want to actually create separate versions, or a universal version of the app. The app will remain iPhone only, but the icon would need to show up proper on both devices.
This is a "business decision", and I think its rather si...
I have the need to draw a background image or set a tint color on a navigation bar, but I also need the option to have the navigation bar appear as it normally would. I'm currently using a category to support If my app does not specify a background image, what can I do instead to ensure the drawRect method does it normally would do?
I.E...
Hi
I have a simple problem, I have an app based on CoreData and I need to change the structure a little. How can I migrate the old structure into the new one. Just adding one attribute will chrash the whole app.
Thanks
...
Hello CocoaTouch-Experts!
This is a fairly straightforward question though my Googling session gave me nothing.
How do I reset the state of a view hierarchy located in a tabbar programmatically? The behavior I want to replicate is when the user tapps on a tab twice. This causes the view located under that tab to return to it's initia...
Hi all,
I have a view controller that has a UITableView which is populated by a NSFetchedResultsController. I'd like to add a UISearchBar to be able to filter the records from Core Data that are displayed in the UITableView via the NSFetchedResultsController.
I'd like to know what the "cleanest" way to do this is, and if there is a cl...
I'm trying to use ZipArchive on the iPhone to unzip a simple text file.
It returns with no error but the file is empty. I would love to know why this doesn't work.
I am using the following methods:
-(void)alert:(NSString*)message
{
UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:@""
message:message ...
I cant seem to wrap my head around this. I have googled, and overstacked for hours now looking for examples that i can relate to. What I have is two arrays.
The name of my first NSMutableArray is "showDates".
I have 3 objects in here.
Object 0: "Today, May 20th"
Object 1: "Tomorrow, May 21st"
Object 2: "Saturday, May 22nd"
Then I hav...
Hi there,
I'm searching a way to display the time elapsing during the reflexion of the application user.
example : UILabel displaying 0:01, 0:02, 0:03 etc until the user click on a button.
I guess NSTimer should be used, but could anybody provide me some example code to implement that simple label ...?
Cheeerio and many thanks ...
...
If you're implementing a subclass, you can, within your implementation, explicitly call the superclass's method, even if you've overridden that method, i.e.:
[self overriddenMethod]; //calls the subclass's method
[super overriddenMethod]; //calls the superclass's method
What if you want to call the superclass's method from somewhere o...