I have a UILabel with some text, say "Hello World abcdefg" The label can have multiple lines, different font sizes etc.
Question: How do I find the coordinates of all letters "d" in this UILabel.
Logical first step is find the position of those characters in the string (UILabel.text), but then how do I translate that into coordinates w...
I have a TableView setup as my "root view controller" and a detail view controller called "DetailController" to allow me to display the detail view for what the user selects in the main table view. The navigation is working correctly - when I select a row in my table the screen slides to the left and I'm presented with my detail view, bu...
I have iPhone 3GS, iOS4, xcode 3.2.3.
After loading the Default.png, I add a little splash screen the looks exactly like the application start view.
This splash screen appears animating in Debug mode, but do not show at all in Release mode(I get a blank screen), this of course rules out any problems with the image, like size or name.
I ...
Hi all,
so I upgrade to Snow Leopard and XCode 3.2.3 / SDK4
now my project won't compile:
ld: absolute addressing (perhaps -mdynamic-no-pic) used in -[MyAppDelegate applicationDidFinishLaunching:] from /Users/ade/Documents/XCodeprojects/MyApp/build/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/armv6/MyAppDelegate.o not allowed...
Hey guys, I am wondering how to put a view on the back button of navigation bar?
Not on title view, but on the back button.
It seems like to me that the back button is a UIBarButtonItem, which doesn't inherite UIView...
Help please!
Thanks!
...
I've been having troubles to run OCMock with iOS 4.
I've read that a possible solution os to build the library, and install libOCMock.a, but honestly, i don't know how. Any help would be usefull
...
I'm trying to read a .caf file as an array of float values in order to perform an FFT and retrieve some pitch data. The .caf file is saved as LinearPCM using the AVRecorder class. How in the world do I go about doing this? Reading up on the structure of the .caf files I understand that their is a file header which will need to be igno...
i can only show last elemnts out of 10 records
qlite3 *database;
scores = [[NSMutableArray alloc] init];
if(sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) {
const char *sqlStatement = "select name,score from game";
sqlite3_stmt *compiledStatement;
if(sqlite3_prepare_v2(database, sqlStatemen...
I seem to be having a strange issue with a 2D game I'm working on. In order to determine if my playable character sprite lands on a platform I first do an if statement checking CGRectIntersectsRect and once I've determined that the player sprite and platform sprite have intersected, I then check to make sure that the center point (plus h...
I need to store two types of objects, Feed and Folder, in an array in Core Data. For example:
Array
Feed
Feed
Folder
Feed
Folder
Folder
…etc...
I know about BWOrderedManagedObject for storing objects in order in Core Data, but I'm not sure how to store mixed objects (the array needs to be mixed, since the i...
I created a sub-thread using NSThread in main thread
NSThread *newThread = [[NSThread alloc] initWithTarget:self selector:@selector(MyThread:) object:timer];
5 sec later,i used [newThread cancel] in main thread to stop the sub-thread,but it didnt work,
Method MyThread: in newThread still working
so,whats the correct answer to stop ne...
Hi,
is it ok to use removeobserver first and then call addobserver call with the same name? Or is it a rule to have addobserver first before removeobserver?
I tried it using OS 4.0 and it seems ok ( no crash, warnings.. etc)..
-(void) setObserver
{
[[NSNotificationCenter defaultCenter] removeObserver:self
...
In my custom movie player ,i use [player setInitialPlaybackTime:playSlider.value];
to make the movie resume playing at the time i slide to,but it has this situation:
the indicator returns to the start of the movie,then go to the time playSlider.value .At the same time, the view of movie get to the starting view of movie then resume the ...
Does anyone know if there are rules against rating your own app in the app store? I would assume that most people would give their own app a 5 star rating if there were no rules - but maybe I'm wrong. Does anyone know for sure?
...
Ok, I'm trying to let a user choose songs from their iPod library to listen to, but I still want to receive remote control notifications (headphones, lock screen osd, etc.) in my app so I can do some extra things. So far I can get either iPod music playing, or headphone events, but not both simultaneously.
Here's what I know so far...
...
So I have an iphone app that presents a modal view when it starts if the user has not registered. Once they register, it saves a user ID into NSUserDefaults. When the app starts at a later time, it needs to load this user id in the appdelegate file.
//Registration.m
NSUserDefaults *savedUID = [NSUserDefaults standardUserDefaults];
[save...
I have rows of subviews within a UIScrollView that I want to rearrange after rotating to landscape mode. Ideally, I want to have 5 buttons per row with the total number of rows determined by the button height and how many buttons there are total (plus some padding).
The problem I am having is how to iterate through subviews while als...
I can get all 5 videos working on my computer's browser, but the fourth video fails on my iPhone (via Safari).
http://basenycapp.s3.amazonaws.com/stream.html
I think it's because the youtube id has an underscore in it. For each video, I'm embedding the youtube videos with the following:
<object width="70" height="60"><param name="movi...
I can't seem to work out how to get a Dictionary representing an object from the dictionary that TouchJSON returns.
For example:
If I use the JSON in the format here:
http://search.twitter.com/search.json?q=hello
How would I get a tweet with the "id" = x without having to pull all of the tweets into an array using a "for" statement?
...
I have a need to measure a room (if possible) from within an iPhone application, and I'm looking for some ideas on how I can achieve this. Extreme accuracy is not important, but accuracy down to say 1 foot would be good. Some ideas I've had so far are:
Walk around the room and measure using GPS. Unlikely to be anywhere near accurate en...