Hi, I am working on application which required me to change the filename case retaining the original filename as it is For Example: need to change abc.txt => (ABC.txt or Abc.txt or abc.TXT or abc.Txt) filename as well as its extension can be change in same way. I tried to use the NSFileManager
- (BOOL)movePath:(NSString *)source toPath...
I'm working on an application that talks home to a server and retrieves some data with image URL's embedded in it. I want to display those images on the view, and am getting them like so:
UIImageView *ivAvatar = [[UIImageView alloc] initWithImage:[UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:self.avatarUrl]]...
I have an xml file that I need to load. This xml file holds data that needs to be accessed by a few classes. I'm wondering what the best approach would be to deal with this.
Basically I need a way to keep the data centralized and allow various classes to access it. Either that or have each class re-parse the xml file for the data it ...
I have a grouped UITableView with a few sections. The text in some of the cells can get quite long, I was wondering how I could make the text word-wrap?
...
I can't find anywhere what the -all_load flag do when compiling Objective-C code.
I have some issues uploading binaries to Apple, the they say it's because I didn't use this flag, but my code compiles even without it.
Can some one help me with that?
Thanks
...
I would like to scroll my UITableView 2 cells down when clicking on a button. The total height for the shift downwards is 100px. How can I accomplish this?
...
Hi,
So I'm getting a EXC_BAD_ACCESS error in cocos2d. From what I've been searching so far it's mostly related to attempting to free an object which has already been released. I have encountered this error before, and its solution was simple and pretty much caused by freeing a released object. But now, using cocos2d (not sure if it's a ...
Whenever a user would type a number, my app would automatically prepend a currency sign before that number. For example, when the user types "1" in a text field, the text inside it becomes "$1.00". All is good when I use an NSNumberFormatter, an NSTextField, and its delegate method control:didFailToFormatString:errorDescription:.
- (BOO...
I'm developing a WebKit Safari Plugin with Xcode. How do I call JavaScript from -webPlugInStart?
...
I am trying to create an objective c interface that encapsulates the functionality of storing and running a lua script (compiled or not.) My code for the script interface is as follows:
#import <Cocoa/Cocoa.h>
#import "Types.h"
#import "lua.h"
#include "lualib.h"
#include "lauxlib.h"
@interface Script : NSObject<NSCoding> {
@public
s...
I would like to test Objective-C but I haven't a Mac. Is it possible to program Objcetive-C on Windows. Another possibility is to do it in Linux. Anyone who knows?
...
I have a UITableView with 3 sections that are hard coded. Everything is working fine, but I am not sure if I am doing it correctly.
Define number of rows in section:
- (NSInteger)tableView:(UITableView *)tblView numberOfRowsInSection:(NSInteger)section
{
NSInteger rows;
//Bio Section
if(section == 0){
r...
I want to make a back button for a navigation controller with the title "Back" instead of the title of the previous controller. I'm using this code:
UIBarButtonItem *backButton = [[UIBarButtonItem alloc]
initWithTitle:NSLocalizedString(@"Back", @"Back")
style:UIBarButtonItemStyleBordered
tar...
So i'd like to do this:
switch (keyPath) {
case @"refreshCount":
//do stuff
case @"timesLaunched":
//do other stuff
}
but apparently you can only use integers as the switch quantity. Is the only way to do this parse the string into an integer identifier and then run the switch statement?
like this:
nsinteger n...
I have a query regarding how delegates work. My understanding was that delegates take responsibility for doing certain tasks on behalf of another object.
locationManager = [[CLLocationManager alloc] init];
[locationManager setDelegate:self];
[locationManager setDistanceFilter:kCLDistanceFilterNone];
[locationManager setDesiredAccuracy:...
I've been working through the exercises in a book recommended here on stackoverflow, however I've run into a problem and after three days of banging my head on the wall, I think I need some help.
I'm working through the "Speakline" exercise where we add a TableView to the interface and the table will display the "voices" that you can ch...
So, in an iPhone app I am working on, I've decided that the best way to display all the contents to the user is to have the top part of the screen show some information, and the bottom of the screen show different information. However, the bottom part will change sometimes, so I was working on implementing that.
Another app that does t...
Hi all!
I am newbie of objective-c and i got this crazy problem…
for low precision test case:
dateString = @"2010-05-25 11:05:21", conversion success.
dateString = @"2010-03-01 15:54:36", conversion fail.
for high precision test case:
dateString = @"2010-05-25 11:05:21.937113", conversion success.
dateString = @"2010...
I am using the iphone SDK and coding primarily in C++ while using parts of the SDK in obj-c. Is it possible to designate a C++ class in situations where an obj-c class is needed? For instance:
1) when setting delegates to obj-c objects.
I cannot make a C++ class derive from a Delegate protocol so this and possibly other reasons prev...
Hi, i'm coding in simple game where i move a square which performs a sound effect each time the square's moving. (like a walking sound)
Problem is playing the sound effect cause a display refresh lag. As if it was too much performance for the engine.
I was asking if there's a way to properly play the repeatitive but not continuously sou...