Hi All,
Table view cell management has driving me crazy from past two days. Please check the code below and I will explain you the problem in detail..
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tabl...
Hi, i have a application that will have multiple uiviewcontrollers, the navigation in the application is not in a hierarchy, the controllers should all be able to be invokedon a need to be displayed basis.
What is the best way of modeling this kind of flow?, using UINavigationController?, or AppDelegate for switching viewcontrollers? et...
Hi, could anyone help with loading dictionary objects correctly into the array.
Loading of plist into dictionary object works fine, and I was able to output some of it into command-line.
Problem is that this way of loading bundles each Name and Price sets into same cell in the array.
IE:
Is it possible to load them separately? Or perh...
In my tableview, I load a custom cell from a nibFile:
customCell = (cellReponseCircuit *) [tableView dequeueReusableCellWithIdentifier:@"cell"];
if(!customCell)
{
customCell = [[[NSBundle mainBundle] loadNibNamed:@"cellReponse" owner:self options:nil]lastObject];
}
customCell.reponse...
unichar c;
c = [myString characterAtIndex:0];
unichar catchcar = [c lowercaseString];
error : invalid reciever type unicar.
I know lowercaseString is used to covert String not character. Is there any solution?
...
Hey guys,
So I am new to the development thing, making me yes a noob.
I am currently creating my first iPhone app and in it I have a countdown relating to when a web video service is launching.
Under the countdown I have a button that allows playing the video stream, I would like to create an if statement that tells the app to reference...
According to Apple if one doesn't create an object using alloc or new then it does not need to be released.
Is my understanding correct? So something like this does not need to be released:
NSURLRequest *request = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:30];
...
Is it possible to use a custom view as the move accessory that appears on the right hand side of the UITableViewCell when a UITableView is in editing mode?
...
So, I iterate through a loop and create UIViews which contain UIImageViews (So that I can selectively show any given part). These UIViews are all stored in a UIScrollView.
I add gesture recognizers to the UIViews in the loop where I created them.
When I run the program, only the items initially visible within the UIScrollView have thei...
Please do tell how I can make a call with the iPhone.
Below is the code I have written, but nothing happens when the button is clicked. Is it a problem of the simulator and would it work on the phone, or is there any mistake in code?
- (void)applicationDidFinishLaunching:(UIApplication *)application {
UIButton *uiButton_G_obj = ...
HI,
I am working on optimizing my iphone project for proper memory management.
my question is:
what's the difference between releasing an object inside dealloc or releasing in the same method where we init it?
Thanks!
...
Here is the code:
-(void)myOwnMethod{
NSString *myString;
myString = [[NSString alloc]init];
/*
Some logic about the String
*/
[myString release]; //Do I need to release the myString Object?
}
As you can see, the myString object is only used in the method, do I need to release it? or it will auto relea...
Hi all, I have a custom cell with a uitextfield inside. I want to hide the keyboard when the user touch the screen, I put a custom uibutton over my tableView, and in the touch up inside event, I call
-(IBAction) hideKeyBoard
{
[customcell.textfield resignFirstResponder];
}
is it the right way to hide the keyboard with a uitablevi...
Hi,
is there an easy way to change the background color of the navigation item on top of a view? I have a navigation based app and I only want that one view gets another background color. I created the views mainly with IB. I found the following solution (not tested):
float r=10;
float g=55;
float b=130;
float a=0;
UILabel *label = [[...
Hello!
In objective c how would you get a function to pause until another one returns?
Thanks!
Christian Stewart
...
I need to create an object in one class hierarchy that wraps an object from a different one. They both have very similar interfaces, and I'd like to automatically have my wrapper forward messages it doesn't recognize to its target in lieu of implementing its own properties. I got this to work using something like this:
- (id)forwarding...
I'm trying to animate a button which moves around the screen. At any point, the user can push the button. But the button doesn't respond to touches. I've tried an animation block but the button simply moves immediately to its end coordinates, while the frame shows the animation (the button is called bubble):
[UIView beginAnimations:nil ...
I have the following code in a stand-alone Cocoa test app:
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
NSView *contentView = [window contentView];
NSTextStorage *textStorage = [NSTextStorage new];
NSLayoutManager *layoutManager = [NSLayoutManager new];
NSTextContainer *textContainer = [NSText...
Hello,
I have a custom class:
@interface Player : NSObject {
NSInteger mPlayerNo;
}
-(id) initWithNum:(NSInteger) playerNum;
@implementation Player
-(id) initWithNum:(NSInteger) playerNum
{
if(![super init])
return nil;
...
mPlayerNo=playerNum;
return self;
}
@end
I need the array of the Player objects ...
Hi Guys,
I am trying to read some text from a plist file and display it to the users in alert box.
When I build the string using this code, everything works (users sees Hello with a smily icon):
NSString *hello = @"Hello \ue415";
but when I get the string from plist, using this code, uses sees "Hello \ue415":
NString *hello = (NS...