objective-c

In App SMS in iPhone SDK 4.0

Hi there, Does any one know how to implement In App SMS functionality in iPhone SDK 4.0 Sandy ...

how to generate an event

Hello everyone I created a subclass from UIView #import <UIKit/UIKit.h> @interface MeeSelectDropDownView : UIView { UILabel *mainText; UIImage *bgImg; UIImageView *bgView; UIImageView *originView; NSMutableArray *labelArray; int selectedItem; BOOL inSelectTag; float _defaultHeight; } @property (nonato...

How do I call an Objective C function?

How to call a function in Objective C? For example: I define the function in header (.h file): -(void)abc and implement this function in implementation file (.m file): -(void)abc { //..... ///.... } Now how would I call this function from where I need it? ...

Apple iPhone SDK Peer Picker

How can I modify the iphone SDK Apple sample code 'GKTank' to support multiple peers? Ideally 4. I know GKit has a peer limit of 4, which is fine. What changes would I need to make to the source file 'GKTANK', so I can learn the process and adapt it to my own current app. Thanks. ...

My Thread Programs Block

I wrote a program that worked as a server. Knowing that "accept" was blocking the program. I wanted to launch a thread with this statement to prevent precisely that the program blocked, but this still happens. Can anybody help? Post code Thanks -(IBAction)Connetti{ if(switchConnessione.on){ int port = [fieldPort.text intVal...

NSMutableArray EXC_BAD_EXCESS SIGBUS

Hi, I've the following code which causes crashes after sometime as i've set the below code in a timer: CGImageRef cgImage = UIGetScreenImage(); [array addObject:(id)cgImage]; CGImageRelease(cgImage); Where initiallly i've declared array as: array = [[NSMutableArray alloc] init]; The timer goes well till 10 seconds as timer is of 1/...

how to get amout of ticks for a reference date on the iphone

Hi there I'm programming against a Webservice that requires the amount of ticks (for the current time) (A single tick represents one hundred nanoseconds or one ten-millionth of a second) since 1.1.0001 (midnight). what is the easiest way to get the amount of ticks from an NSDate Object? thanks for your help ...

UIScrollView setZoomScale not working ?

Hi, I am struggeling with my UIScrollview to get it to zoom-in the underlying UIImageView. In my view controller I set - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView { return myImageView; } In the viewDidLoad method I try to set the zoomScale to 2 as follows (note the UIImageView and Image is set in Interface Bui...

Animating an Image

hi friends, I m creating a game, in that i want to use some animation, but i m new to animations. I want to create an image ,as soon as i click on imageview, the image should come in bouncing manner as if it is a Ball, so is it possible to do so??? The image is predefined for the game.and it must come after touch begin event occures, can...

problems with didselectrowatindexpath

hi there, i have just converted an app i was making from a navigation controller app into a tab bar app. an everything works fine apart from this one thing, the first of my tabs brings in a table view,and what i want to happen is when a user selects a cell i want it to push on a different view controller(like it did when it was a navig...

Password check from the database, what am I doing wrong ???

-(IBAction)EnterButtonPressed:(id)sender { const char *sql = "SELECT AccessCode FROM UserAccess"; double result = ([Password.text doubleValue]); if(sql == result ) { NSLog(@"Correct"); } else { NSLog(@"Wrong"); } } ...

My Thread Programs Crash

I have a problem with threads objectiveC. The line of code below contains the recv block the program waiting for a datum. My intention is to launch a thread parallel to the program so that this statement does not block any application. I put this code in my program but when active switch the program crashes. Enter the code. -(IBAction)C...

What's a good way to create an Event Calendar

Hi, I want to create an Event Calendar for my iPhone App. In a first instance the Event Calendar is supposed to list the Events and have a Details View with additional info. It is also supposed to contain an action to trasfer a specific event to the iPhone Calendar. First thoughts go towards using a UITableView where I make the event da...

Find inside of UIWebView

Hello, I'm having hard time while trying to search inside of UIWebView. I know that I need to use javascript for that but almost everything I found uses replacing the HTML code and searching by element.type. My HTML file is so big that it's not possible to use this approach and honestly I don't need highlighting. Could anyone help me to ...

Is release without prior retain dangerous?

I have some code which I think has extra release statements. Is the code incorrect? What is the end result? I don't understand memory management well yet - even after reading lots of articles and stackoverflow answers. Thanks for straightening me out. Update: The attached snippet works fine, but other code has the over-release prob...

UINavigationController leftbutton problem

Hello guys! Here's my code: UIBarButtonItem *leftButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(rightButtonPressed)]; [self.navigationItem setLeftBarButtonItem:leftButton]; [leftButton release]; The 'self' class is inherited form an UINavigationController and is I ...

iPhone/Obj-C: Accessing a UIScrollView from a View displayed within it.

I'm writing a simple iPhone app which lets a user access a series of calculators. It consists of the following: UITableViewController (RootViewController), with the list of calculators. UIViewController + UIScrollView (UniversalScroller), which represents an empty scroll view - and has a 'displayedViewController' property. UIViewContro...

Problem using MBProgressHUD with asynchronous NSURLConnection?

I am trying to get the code found here: http://snipplr.com/view/26643/mbprogresshud-with-an-asynchronous-nsurlconnection-call/ to work in my project. It's using the private MBProgressHUD class however i keep getting exc_bad_access errors on lines 69 or 70 depending if you comment out the log statemet: NSLog(@"float filesize: %f", [sel...

How to add a cell to a UITableView?

I want to be able to add 1 cell to the top of a UITableView after the user clicks on a button. How can I achieve this? Update: I also want to hide the cell if the user clicks another button ...

UITableViewCells with different cell sizes

Is it possible to have a UITableView that has a fixed height for all cells, except for the cell at the top (index 0)? If so, how is this possible? ...