I seem to be missing something obvious here, why would I want more than one activity per application in Android? Does somebody have some solid examples?
What is the use of viewDidUnload and didReceiveMemoryWarning methods?
When they actually get called?
what are the difference between dealloc, viewDidUnload and didrecievedmemorywarning?
Hi
I have a grouped table with two sections where I display text with different length and therefore cell height.
I have solved the problem with the different length/height with constrainedToSize in cellForRowAtIndexPath.
Now I want to add a section with one single row in which I want to show a picture.
How should I best implement that? (still a bit of a beginner with the Objective C)
I would guess that I would have to create an UIImageView and somehow link that to the cell, but my biggest concern is how do I do with the dequeueReusableCellWithIdentifier now that I will have two different type of cells?
Appreciate any advice that will help me save time from trial and error!
Hi , iam using setting.bundle and i try to show a hidden picture with Switch toggle , here is my code but i miss something :
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[//Some code show the hidden pic]; myPic.hidden = NO;
my key is .e.g = wood_back
should i use ObjectForKey ?
Hi there,
I am developing an iPhone app, which now can update Twitter account with GPS coordinates in real-time, by the Twitter API link: http://username:[email protected]/statuses/update.xml , and I am looking at how to make my own database to accept updates from iPhone, via a similar API page.
It seems a .php page can serve as the API, and MySQL can serve as the database.
What are the good ways of doing it? Any template code and tutorial please?
I know there are a few apps out there to fake a devices location but specifically what i want to do is use a location grabbed from a url.
What direction should I look for setting the location on the device.
The scenario i have is a jailbroken Wi-Fi iPad tethered to a nexus one. The nexus one would host a background service that when a request is recieved, it would respond with gps data of its current location. The jailbroken ipad would have a background service that either updated the location on a time interval, or on a per request basis (depending on how i have to implement it) by submitting a request to the tethered nexus one service. That data would then be set on the ipad and an application requesting location would get the service data.
The goal is to recreate the location faker app's functionality with the exception of the spoofed location comes from the nexus ones gps via the service but i have not yet found out how to set the location data for the device. I can ofcourse implement this in a per app basis but it would be awesome to have any app be able to use it.
I am attempting to use a few of the simple android examples for Tab Views. One thing i am attempting to do different than all the examples i've seen so far, is to not use a TabActivity. I am trying to use a normal activity, which means i need to retrieve the TabHost object some how, so i can add tabs and etc to it. How can this be done?
If you wanted to retrieve a view, you can simply use findViewById(R.id.blah), but how can you retrieve the TabHost object in a similar manner?
I would like to detect when the phone is in motion, but not all kind of motion. For example picking up or waving the phone should not trigger.
I would like ideally to run a code when the phone/person is in "walking" state. What options I have?
Does anyone know why setting the map as hybrid has no effect. Setting it as standard and satellite works fine though?
[mapView setMapType: MKMapTypeHybrid];
I have an iPad app where you add photos to a page. I then want to save the photos positions, then add further pages with more photo positions and eventually save all the pagesto be looked at later in a slideshow style.
Can anyone advise
1. Saving UIImageView states when moving to new views (or swapping views)
- I see this on using NSCoding iPhone - save UIImageView state - but am at a lose - any more examples ?
2. How to save the 'entire' set of view to look at later (like a slideshow)
- no idea on where to start with this ? array ? coredata ?
Thanks
I'm only supporting the portrait orientation, but both the right-side-up and upside-down versions. Why do my subviews not resize appropriately? There's a status bar sized black space at the top of the view. If I change tabs and come back, it's corrected.
Hi,
I am having a hell of a time trying to do what should be something simple.
I have created a Tab Bar Application. How do I change the view SomeView.xib ?
All the examples I see are from View To View, Tab to Nav.
Any suggestions ?
Is it possible to get Autocomplete or Something when i work with the eclipse form editor?
I write a color in the strings.xml and then i want to select it by the propertys for the text color, but there is no autocomplete or something equal
I have an activity with two buttons, start and stop. If the user press the start button a service is created using Context.startService. And the stop button calls Context.stopService.
I want the stop button to be the only way to destroy the service. Now, if i end the activity using a task manager, the service is killed as well. Is there any way to avoid this?
Hi
I downloaded and installed Version 3.2.1 of XCode.
On the top left dropdown, I can only see the option of building it in 3.12 and 3.13.
Any ideas one how to build it it 3.1?
Thanks,
Chris
digadesign is online now Report Post Reply With Quote
How can i connect buttons in the example of this Project. zip
Here's the link of the file--- (http://www.2shared.com/file/12046081/65fad040/Project.html).
Example: Button General Information connect to 3rd page, button Trainer information connect to the next pages number.
May i need to create a new .h/.m/xib file for each of the pages?? then, where's the code to connect the button to the page. Also , how (the steps) to make it true??
All of your replies i thank you all first. Very appreciated it =)
An answer posted for one of my previous questions brings up another question; I am calling a new view controller, "RuleBuilder," from my rootViewController. The rootViewController holds a reference to a contacts array. How do I get a reference to that array into the RuleBuilder? I tried adding
UITableViewController *rootViewController;
...
@property (nonatomic, retain) UITableViewController *rootViewController;
to RuleBuilder.h, and then
@synthesize rootViewController;
in RuleBuilder.m. When I instantiate and push the RuleBuilder from within rootViewController, I do this:
ruleBuilder.rootViewController = self;
But when I try this
[rootViewController.contacts addObject:newContact];
from within RuleBuilder, I get a compiler error to the effect of "request for 'contacts' in something not a struct" (or very similar; I haven't implemented this exact snippet of code, but I tried an identical approach not an hour ago for a couple of different references that I never was able to get working).
Thanks, again, for your help.
Hi,
On view in IB I have numerous items (including view itself). ONLY one item has tag 0, yet following line works for ANY UITextBox other then the one with tag 0. Note that only ONE UITextBox has tag 0, why:
(UITextField *) [self.view viewWithTag:0]).text = @"foo";
Interesting that when triggered event received for the element with tag 0, I can get value of Tag 0 with no problem.
Is there a limitation to look for tag 0 elements?
hi, i am building an application that imports JSON results and parses the objects to a table cell. Nothing fancy, but in my results, many of the terms/names are European with characters such as è or ú which come out as \u00E9 or \u00FA. I think these are ASCII ? or unicode? ( i can never keep em staight). Anyway, like all good NSSTring's, i figured there must be a method to fix this, but i am not finding it....any ideas? I am trying to avoid doing something like this: this posting. Thanks all.
Hi Everyone,
I am working on adding a custom accessory view, (a button) to a UITableViewCell, and I need it to tell the table view when it is touched, but I can't figure out how to communicate to the table view what button was pressed. Ideally I'd like to somehow call a function like this:
[controller tableView:view didSelectCustomButtonAtIndexPath:indexPath usingCell:self];
when my custom view button is pressed.
Sorry if this is a bit vague, I'm not really sure how to explain this well. I am basically looking for how to mimic the implementation for tableView:didSelectRowAtIndexPath: without having to subclass UITableViewCell.
Thanks for any help.
I need to figure out how in the world do I create object instances (an image) and place them on the screen and have it draggable. I know how to draw an image (png) onto the screen, but how do I make it draggable?
Here is my problem: I am trying to move a puzzle piece around the screen and then connect to the other piece if they are in close proximity. I have achieved this, though it is perhaps a little odd the way I did. My problem though is that once they have connected, I can't figure out how to move them as one image, instead of two separate entities. I would really appreciate any help or suggestions. Here is a sample of what I have been doing:
(void)touchesMovedNSSet *)touches withEventUIEvent *)event{
UITouch *touch = [touches anyObject];
[self dispatchTouchEvent:[touch view] toPosition:[touch locationInView:self.view]];
}
-(void)dispatchTouchEventUIView *)theView toPositionCGPoint)position{
if ((CGRectContainsPoint([picture frame], position))) {
picture.center = position;
}
if (CGRectContainsPoint([picture2 frame], position)) {
picture2.center = position;
}
}
How can I get flash effect for images got from Camera?
After I got image from camera (it shows in UIImageView) and before saving it as a file I'd like to lighten (in some cases) image by pressing Flash button. Is it possible by using Core Graphics ??