iphone

iOS4: Correct SDK and Deployment Target Settings in Xcode

Hi, I upgraded my Xcode from 3.1.2 to Xcode Version 3.2.3 and upgraded my device to 4.0 OS. I have set my Base SDK to iPhone Device OS 4.0 and the iPhone OS deployment Target to iPhone OS 3.1.2. When I run my application (which was created in 3.1.2) on device under iOS4.0, and I see problems such as dates not displayed and the "back" ...

Show the number of unread items just like in the Mail app

I am making an iPhone Application which has a list of RSS Feeds, and I want to show a blue bubble on the left with the number of unread articles (one bubble per feed), just like in Mail app, as shown here: Does anyone know if this is possible with Cocoa Touch, or must I add a UILabel? If I must use a UILabel, then how do I make it r...

Reading binary file into array in Objective-C [iPhone]

Hey I want to read binary file on my iPhone. I have .txt file which stores information about an array: int[6000][9] How can I put this data into an array in my code? I tried this: int mapa1[6000][9]; NSFileHandle* file = [NSFileHandle fileHAndleForReadingAtPAth: @"level1.txt"]; [[file readDataOfLength:4] getBytes:mapa1]; mapa1 = NSSw...

Out of memory when migrating models

I am migrating data from one model version to another in the iPhone, but the migration causes the device to run out of memory and crash. Not to mention it takes forever on the device. I use the default migration settings. I guess the bad guy is one of the tables that contain the order of 105 rows. This table has not changed though, but ...

working with core data which maintains primary key and foreign key relations in iphone app

hello all , I am developing Iphone app that reads data from url and after parsing i should save that data for persistance.(Because of getting app in offline also...). I want to use core data for this. Such that first time only we will read the data from url and save into objct model, so from second time onwards we can fetch the data fro...

iPhone app fails to launch after install on iOS 4, works after device reboot

I have an application that worked just fine on iOS 3.0 - 3.1.3. When testing an iOS 4 SDK ad-hoc build however the app behaves strangely. After installation (with either Xcode, iTunes or iPhone Configuration Utility) the app does one of two things: App launches and works, but fails on subsequent launches and just shows a black screen. ...

Problem with Function to convert UNIX TimeStamp

I get those two errors: - Can not use an object as parameter to a method - Incompatible types in return That's my code: - (NSString) dateStringFromUnixTimeStamp:(NSInteger)timeStamp { //Create Date-String from UNIX-Time-Stamp: NSDate *date = [NSDate dateWithTimeIntervalSince1970:timeStamp]; NSDateComponents *monthComponents = [[NSC...

Handle Keyboard Done pressed event on Iphone

Hello, I am moving my view when a text field is pressed in order to get proper view when keyboard appears. Now, when DONE key is presses I would like to return view to its initial state but, how to handle an action when done key is pressed?? Thanks ...

Core data relationship delete action - cascade vs. nullify vs. deny vs. no action

Core Data is throwing me for a loop. I have two objects:, Card and CardSet, which are in a many-to-many relationship with each other, i.e. you could have cards 1, 2, and 3 in CardSet A and cards 2, 4, and 5 in CardSet B. I am trying to set up my delete actions so that: If I delete a Card, it is removed from all CardSets to which it be...

How do I draw custom "Callout Bubbles" (the place name transparent-gray overlay) in an iPhone application using non-google maps ?

Hello, I'm building an iPhone application with a map inside (using route-me, not MapKit). I have some markers on the map, and I want to have an overlay - similarly to the google maps one - that appears once you click a marker: A black - a bit transparent - overlay, with a button inside, and a little triangle pointing to the marker th...

Fluent interface pattern in Objective-C

I am a newbie in Objective-c and I would like to implement fluent interface pattern in my OC class. Here is my updated and simplified case from my project: // .h file @interface MyLogger : NSObject { ... } - (MyLogger*) indent:(BOOL)indent; - (MyLogger*) debug:(NSString*)message, ...; - (id) warning:(NSString*)message, ...; .... @end...

iPhone: UIControlEventTouchUpInside fires multiple times...

Hi, ** solved... see explanation on bottom ** can anybody give me a hint about highlighting a control in response to UIControlEventTouchUpInside? What I want to achive is the highlight effect similar to UITableViewCell, when touched. In the following code I change the alpha value of a highlight view when the user touch up inside the c...

VideoPlaylist iPhone

Hello, if I open a online Video file like this: [UIApplication sharedApplication] openURL:[NSURL URLWithString:url]]; the App will closed ... is it possible to create a playlist for the videoplayer application? ...

App store link for "rate/review this app"

I want to put a "rate/review this app" feature into my app. Is there a way to link directly to the screen in the app store where they review the app? So the customer doesn't have to click through the main app link. Thanks. EDIT: starting a bounty on this due to the lack of response. Just to make sure it is crystal clear: I am aware...

iPhone SDK: Load Tweets into UITableView?

Hey, I need to include a Twitter-Feature with the Tweets of my account, but I don't know how I can get my tweets and show it in a UItableView? Please Help.. Thanks. ...

Back button is not visible in Navigation Bar in iPhone OS 4.0 in iPhone

Hi, In my application(View based), the back buttons are not visible in navigation bar. If i clicked that button, the actions are working properly. Its very weird to me. Back button is visible and properly working in iPhone OS 3.0 and others.(Except OS 4.0). Now i am currently working in iPhone OS 4.0. Here my code is, UIButton *btn=...

SQLite iPhone - Insert Fails

Hi, I am trying to insert a value to a SQLite db, but everytime I try my program simply crashes with no error message at all. Here is my code: - (void) insertToDatabase:(NSString *) refName { // The Database is stoed in the application bundle NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomai...

TTNavigationController not working

I have downloaded the latest build of the three20 library but it doesn't include the TTNavigationController. I looked through the files on github and found the classes there though. So I downloaded them but now I can't find it's parent class TTBaseNavigationController anywhere. Does anybody know what's going on with the three20 build I g...

dateformatter works in simulator but not on device

Hi, this code works on simulator ... but not on my ipod touch... on ipod I see the unformated date :-( NSDateFormatter* formatter = [[[NSDateFormatter alloc] init] retain]; //Date Before = Sun, 20 Jun 2010 06:00:00 +020 [formatter setDateFormat:@"EEE, dd MMM yyyy HH:mm:ss Z"]; NSDate *d = [formatter dateFromString:...

Core Data client+server/background saving/general import question

I'm working on a Core Data-based application that has a Mac application acting as a 'server' and an iPhone as a client. Everything is going swimmingly, except I'm running into performance issues. When the user taps an object, the server must return some objects related to that object (nothing too heavy, usually 3-4 objects) and show a U...