Hi
Can anyone enlighten me as to why i'm getting an EXC_BAD_ACCESS on this chunk of code? I ran Instruments with Allocations and NSZombie enabled, and it said i messaged a zombie, but can't see whats up with it.
NSMutableArray *keys = [NSMutableArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource: @"keys" ofType:@"plist...
"Forced" to use sendSynchronousRequest (POST) for our application. Checking if "response" is nil (below) will catch a few of the connection errors that may occur, but I'd like to invoke a timer as well to cancel the request after about 20 s. Not sure on how to do that and how to "wait" for time out. Any suggestions? Thanks in advance.
...
Hi,
I'm trying to place the icons / images horizontally in a view that is intended to show details. Maximum number of pictures per row is 6 pieces and I want to have a mechanism that manage line breaks or similar automatically. I suspect it is a custom cell that solves this?
I have tried the following code below, but the images above to...
Hi
I want to add string to message of my UIAlertView
-(void) errorState:(NSException *) exp
{
NSLog(@"Error State Blood Level3 %@",exp);
NSString * myString = (NSString*)exp;
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:myString delegate:self cancelButtonTitle:@"Go to the main menu" otherButton...
I have to be able to communicate wirelessly which means it would either be MODBUS TCP/IP over wifi or MODBUS RTU over bluetooth. I cannot find any modbus implementations with an objectiveC wrapper, but I can write the wrapper over a C library. How should I go forward?
...
The two terms seems to be used inter changeably.
Is my understanding correct that Cocoa Touch refers to the framework that handles touch whereas Objective-C is just the syntax and language used to interact with this framework?
Much like WPF and C#?
...
I noticed today, when adding 1 CALayer and 2 subviews to my view, when I run the following code in my UIView instance:
[self.layer.sublayers count]
This returns 3. Does this mean that a subview is also considered a sublayer? If I only wanted the CALayers that I've drawn in my sublayers call, how would i do that?
...
Hi,
I have to implement a small feature in an iPhone app and was wondering if there was a way to do use an if statement where the condition is the string of a button.
Here’s a sample of the code in question:
- (IBAction)someMethod:(id)sender{
UIButton *button = (UIButton *)sender;
if ( button.titleLabel.text == “SomeText” )
{
//...
Hi
Im creating and adding a grid of buttons to my custom view keyboardView as follows:
int offset = 0;
for (int row = 0; row<4; row++){
for (int col = 0; col<13;col++) {
offset +=1;
UIButton *aButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
aButton.frame = CGRectMake(5+col*65+offset,5+row*65, 60,...
Hello
I was made the project for iPhone which contain UIImage. Now I have to implement same project
for iPad . So what is size of image which can i used. also tell me if there is any another code for for page size as it was in iPhone like CGRect like that. also provide some code to adjust image from landscape to portrait.
Thanks
...
I'm new to this and in my application I use UISearchBar. When I enter any word to search in it the application crashes.
In my project I am using sqlite and values are fetched from the db in AppDelegate and saved in an NSMutableArray named docArray.
RootViewController.m
- (void)viewDidLoad{
listOfItems = [[NSMutableArray alloc] ini...
Hello all,
I'm new in iPhone Application Programming.
I can't get value from XML file and display it in UITableView. I need to get the name value of animal. How is the simple way to parse XML without attribute? I've been read NSXMLParser Documentation but the data is not displayed in my UITableView.
Here is my XML file :
<Employees>
...
Hi everyone.
In my app I add an CFMachPortRef (via CFMachPortCreateRunLoopSource) to a threads CFRunLoop
Now i was asking myself, can this be done using GCD? Let's say instead of spawning my own NSThread and add the created CFRunLoopSourceRef to its run loop via CFRunLoopAddSource, add the event port to a dispatch's runloop?
I think t...
Hi all,
I need to write pure Msword file in objective C.
I have been writing .txt file till now but when i write a .doc file i'm facing encoding issues with all encoding schemes.
Microsoft provide library in visual studio to play with .doc files which is not available in Xcode.
So is there any way to make it happen?
...
I've not found a answer to this question anywhere, but this seems like a typical problem: I have in Objective-C a "NSDate timestamp" that looks like "2010-07-14 16:30:41 +0200". The java timestamp is just a long integer (for example:"976712400000").
So, my question is: What is a Objective-c equivalent to java timestamp?
Thanks in adva...
Any suggestion how can i improve it the size of image intially is 2000*1500
CABasicAnimation* shrink = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
shrink.toValue = [NSNumber numberWithDouble:0];
shrink.duration = 15.0f;
shrink.fillMode=kCAFillModeForwards;
shrink.removedOnCompletion=NO;
shrink.delegate = self;
[imagevie...
My app has a navigation controller and two views, firstController and secondController.
firstController has a webView that displays an html page with links, and clicking any link will take the user to secondController. This is where the program stops by stepping through the debugger.
See code below.
- (BOOL)webView:(UIWebView *)webView...
I need to create NSManagedObject instances, do some stuff with them and then trash them or store to sqlite db. The problem is, I cannot create instances of NSManagedObject unconnected to MSManagedObjectContext and this means I have to clear up somehow after I decide that I don't need some of the objects in my db.
To deal with it, I ha...
ref1view.hidden = NO;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.25f];
[ref1view setAlpha:([ref1view alpha] == 1) ? 0.0f : 1.0f];
[UIView commitAnimations];
Can anyone please give me a breakdown of how this works.. Specifically the:
[ref1view setAlpha:([ref1view alpha] == 1) ? 0.0f : 1.0f];
It ...
I was coding some stuff on objetive c.. but I still dont get it, I dont know/understand what a delegate is at all.
Maybe cuz my main programming language is C++ and Java... dont know.
I searched the web looking for an ENGLISH explanation, but, seems like I dont speak english :)
...