For example, I have a huge switch control structure with a few hundred checks. They're an animation sequence, which is numbered from 0 to n.
Someone said I can't use variables with switch. What I need is something like:
NSInteger step = 0;
NSInteger i = 0;
switch (step) {
case i++:
// do stuff
break;
case i++:
// do stuff
...
I present a UIViewController modally but would like to push another ViewController from the modal view. How can this be done as pushViewController does not work from a modal view. Thanks
...
I'm attempting to synchronously read from a CFReadStream objected created by CFStreamCreatePairWithSocketToHost. The stream opened fine but when I attempt to invoke CFReadStreamRead on it in a loop, CFReadStreamRead() returns -1 and the resulting error is:
Error Domain=kCFErrorDomainCFNetwork Code=2 "The operation couldn’t be completed...
Updated : I got "cannot connect to iTune Store" alert after 6 minutes. Is it possible to set any time out value while inApp Purchase.
My InApp purchase code works fine in normal network, but in very slow network(safari browser will take 5 min to load a webpage). I am not getting any delegates...
- (void)requestDidFinish:(SKRequest *)re...
Currently I have a subClass of MKAnnotation and I was wondering if its possible to add extra tile attributes. Currently MKAnnotation adds
Title
Subtitle
Is there a way I could add two more lines / NSStrings to allow 4 lines of text?
Title
SubTitle
Location
Date
gary
...
I am sorry if this is an FAQ, but what is the difference between the two statements below? I have been looking on google and also on Apples documentation and I can't seem to find a salid difference. My best guess is the localised one is optimised to be updated at runtime. Could anyone kindly clarify for me?
NSString *title1 = [NSString ...
I have a very simple UITableView that has 3 sections, and 3 rows per section.
#pragma mark -
#pragma mark UITableView delegate methods
- (NSInteger)tableView:(UITableView *)tblView numberOfRowsInSection:(NSInteger)section
{
return 3;
}
- (UITableViewCell *)tableView:(UITableView *)tblView cellForRowAtIndexPath:(NSIndexPath *)index...
I have a grouped UITableView that has 3 sections. I would like to show a UIImage with some text next to it (not a cell), but I am not sure how I can go about doing that? The image and text need to match the background of the pinstripes.
...
I have a UITableView with 3 sections inside of a UIViewController. Is it possible to have other controls above the UITableView for example a UISlider or a UIImage? If so, how can this be accomplished?
Note: These controls should not be in a UITableViewCell, they should be part of the view.
...
I have a UITableView with a view in the header. This view has the pinstripe background and contains a UILabel. I want the UILabel text to look like the text of a section header. How can I achieve this?
...
I have a dynamic array of strings, the elements of which I would like to localize. Is there a way to localize the strings without iteration e.g. something like using "makeObjectsPerformSelector". Thank you
...
I have an .xib file connected to a ViewController, which is init'ed as the root controller of an instance of UINavigationController in my appDelegate.
In that view, I have a UISearchBar and a UITableView below it.
When the view loads up, there's a navigationBar at the top, followed by a ~20 pixel gap, and then the UISearchBar, and th...
Hello,
I have this View class. It adds subviews to itself and then I want to do a CATransform3DMakeRotation on one of them (the last one added with addSubiew). Its on top but as soon as the animation starts it is underneath the oder views. Here is my CATransform3DMakeRotation code:
CABasicAnimation *topAnim = [CABasicAnimation anima...
Hi all,
In my application, I need to add this functionality that there should be an arrow image upside down placed before first cell and some text like "Pull down to refresh" and when user pulls the table beyond this then this arrow gets inverted and text changes to "Release to refresh" and when the user releases his finger, the data is...
I have a tableview which is added to a UIViewController as the tableview only fills the bottom 3/4 of the screen.The rows contain editable UITextFields. When a field is tapped, the keyboard appears but the table does not scroll upwards as would normally be the case. Consequently, the keyboard obscures the field being edited. I have tried...
I added a CATransform3DMakeRotation to a layer. When I add another one it deletes the old one?
The first one:
[UIView beginAnimations:@"rotaty" context:nil];
[UIView setAnimationDuration:0.5];
[UIView setAnimationDelegate:self];
CGAffineTransform transform = CGAffineTransformMakeRotation(-3.14);
kuvert.transform = CGAffineTransformRot...
Hi,
I develop an application in which i selected the UITableView (only two row) having group style on the UIViewController with background image. But i want to be only those two row of the group table shold be displayed on the background image, and the header and footer of the table must be hide.
How i do that?
...
Hi all,
In my application, I want to fetch new xml data after user scrolls through tableview and pulls the first cell down. As the data is loaded in tableview in chronological order, the updated data will be shown before the first cell.
I want to run this process on new thread, so what is the best option :
Subclass NSThread and use i...
Hello everyone,
I want to set the preferences of my application in the settings application. I have gone thru the documentation for creating preferences for iphone applications using settings.bundle . But the documentation only speaks of how to set the value and extract the values from the preferences. But in my settings application for...
I have a grouped UITableView with a few sections. The text in some of the cells can get quite long, I was wondering how I could make the text word-wrap?
...