iphone

Can this loop be optimized?

I'm at the debugging/optimization phase with an iPhone app. I have one bottleneck left - the only place where the program has a noticeable lag, and it's in the following loop: (By the way, I've renamed the vars with letters and types. (The real names are much more human-readable in the actual app, but make little sense out of context, so...

setting the images in a tableview which i am getting from the server?

Hi all, I am using the code below to set images in a table which are loaded from the server, but I have an exception thrown (not every time) which is related to a drawing error - (void) getTheThumnbails:(NSIndexPath *)indexPath{ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; GDataEntryYouTubeVideo *entry = [feedAr...

How to implement other events for UISegmentcontrol?

I have implement UISegment controll using value change event.I want to implement UIButtons event in uisegment controll.Is it possible? ...

Persisting data objects on the iphone

I was wondering what your thoughts were on persisting objects (NSDictionarys and NSMutableArrays of Objects) on the iPhone? I've gone through a couple of options in my head: 1.) We persist using NSUserDefaults, this method seems the easiest and I sort of want to just go ahead and use this. The Data I want to store would only maybe be ...

iphone-cocos2d: 0.9 & 0.8.2 slower than 0.7.1?

I have a code that set's a bow's angle according to where you have touched the screen. a simple "bow.rotation = X" command is performed on the ccTouchesMoved event. the problem is, that while running the code on 0.7.1 of cocos2d against 0.9 or 0.8.2 it worked way better, in 0.9 and 0.8.2 it seems like it skippes some of the touchesmove e...

iPhone App link to iStore for commission

Is it possible to link from an iPhone application to the iStore so a user can (a) play a sample of music and then navigate to that track in order to buy it? In a bit more detail: the application lists a number of tracks for a particular artist (a recommendation by the app based on user criteria). The user scrolls down the list and finds ...

iPhone Bluetooth Access

Hi, Is there a way to access BT functionality in iPhone, rather than public APIs? I need to do some research experiments and really don't need AppStore acception, so I can go as low level as possible. Any suggestions? ...

Save Web Images to Sqlite

Hello Brad, I have an application which sets an web image to the background of the homepage.From next time it loads the homepage background from web as my application stores just the name with the address.This is my code: Sqlite *sqlite = [[Sqlite alloc] init]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, ...

multiple uiimageview touch

hi guys, I am just trying to plan a new app... I want to have a series of images which a user can drag around the screen and drop where they want. I'm thinking that I will have an array (NSMutableArray) of all the images. when the app loads, it will draw these out to a scrollable UIView... then the app will know which a user has presse...

Automate move of adhoc to itunes

Hello, Does anyone have a way to automate the drag of an adhoc application on a iPhone development box into iTunes? Every time I have to drag the app into iTunes manually, and would love for this just to happen when I build. Thanks! Rob ...

general UITableView Question (switch Content of a TableView...)

Hi there I have a general question regarding UITableViews. here is my situation. I have a view with a couple of buttons and a UITableView, by pressing a button, the UITableView's Content should change. I use Custom Table Cells (the same cells in every seperate table) but of course with different content. I'm not sure if It is good pr...

How do I import a class into an iPhone project?

I'm sure this is very easy but I'm trying to get the fmdb sqlite wrapper to work in an iPhone project. I've grabbed the files via SVN, and there are 'h' and 'm' files inside an 'src' folder. I'd assumed that if I right-click the Classes folder and select Add > Existing Files... that would work. But when I try to compile I get an error...

How to style UITextView with a 3D shadowed border?

In another post, luvieere shared a means by which rounded corners can be applied to a text view using the QuartzCore framework (see post). It would seem to me that a 3D border, like that found on a UITextField, could be created via layers instead of using a background image. Does anyone know if or how this can be done? I'd really like ...

Undo typing in UITextView

I'm using iPhone SDK 3.0. Say, I enabled 'shake to undo' by setting application.applicationSupportsShakeToEdit to YES in my app delegate. I created an UITextView in RootViewController and had it become first responder upon app launch. I use - (BOOL)textView:(UITextView *)aTextView shouldChangeTextInRange:(NSRange)range replacementText:...

UIImage detecting touch and dragging

Fairly common question this, to which I have a few answers and I'm nearly there. I have a button which when pressed, will create an image (code as follows) (numImages is set on load to ZERO and is used as a count up for the tag numbers of all images created) UIImage *tmpImage = [[UIImage imageNamed:[NSString stringWithFormat:@"%i.png",...

How do you get the time interval for UIDatePicker in UIDatePickerModeCountDownTimer mode?

I have a UIViewController with a UIDatePicker datePicker property. I have configured it in Interface Builder to have a UIDatePicker in "Timer" mode and to have it call the datePickerValueDidChange: method of the view controller when the "Value Changed" event occurs. The code in the view controller looks like this: - (void) viewWillApp...

Removing image from UIImageView

I load a UIImageView with an image depending on user interaction. When the parent view is initially displayed, no image has been selected and the imageview is black. If the user leaves that view and comes back, the image is still there. I've tried myImageView.image = nil; upon leaving the view but the image remains. How can I remo...

How does photo library display so many images?

To extend on the subject, ...without crashing? I load about 15 full size images from the photo library in UIImageViews and get out of memory warnings and eventually an app crash. These images range from around 250KB to 400KB. The UIImageViews are set to aspect fit. The photo library seems to load smaller file size versions of images,...

Problems with manipulating bytes in a NSMutableData - Wave Header info

I am trying to manipulate a wave file header. I have loaded the file into a NSMutableData and am trying to change the wav file header info. My problem is that on the line: [maindata replaceBytesInRange:range withBytes:((UInt32 *)tfSC1Length)]; I am receiving a EXC_BAD_ACCESS error. Can't understand why. Any ideas? The code I am u...

Objective C: Size of an array changes when passing to another method

Hi, I've got a small problem. I've got an array and its size changes when passing to a c-function from an objective-c function. void test(game_touch *tempTouches) { printf("sizeof(array): %d", sizeof(tempTouches) ); } -(void)touchesEnded: (NSSet *)touches withEvent: (UIEvent *)event { game_touch tempTouches[ [touches count] ]; ...