Is there any easy way to detect these kinds of gestures for iPhone?
I can use touchesBegan, touchesMoved, touchesEnded. But how can I implement the gestures? thz u.
Hi,
I have a layout which requires a tab widget containing two tabs. Ideally I'd like to have each tab just be a completely flat colored rectangle, side by side. Almost exactly like the buttons you see at the top of this web page titled:
"Questions" | "Tags" | "Users" | "Badges" | "Unanswered"
but without the whitespace in between. I'd like to have the highlighted tab have a brighter background color.
Is this possible using the tab widget? I know in 1.6+ there's a method to specify a view for the tabs themselves, but can I achieve this tight look, or should I just roll my own?
Thanks
After reading this thread:
http://stackoverflow.com/questions/2792932/nsuserdefaults-not-present-on-first-run-on-simulator
I know it's quite easy to store some app data in the [NSUserDefaults standardUserDefaults]. But if other applications also happen to use the same key to store their data, is this possible that my app data gets overwritten?
Many thanks to you all.
Hi,
I tried to understand from the api the porpese of PendingIntent, coz sometimes some method i use requires this, i still didnt get the idea right, anyone could exaplin?
why cant i juse use context?
thanks,
moshik
I'm building a web app that integrates with Google Drive, and am wondering if there was a way to list, search or delete files.
I see from https://developers.google.com/drive/v1/reference/files#resource that there are 4 operations. If there are no list and search capabilities then the onus is on the app to handle the management.
Is there another API I should be using? Are those features in the works?
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.
Does anyone know why setting the map as hybrid has no effect. Setting it as standard and satellite works fine though?
[mapView setMapType: MKMapTypeHybrid];
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
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
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?
- (void)viewDidLoad {
[super viewDidLoad];
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
self.title = @"Library";
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Close" style:UIBarButtonItemStyleBordered target:self action:@selector(close:)];
self.tableView.rowHeight = 80;
}
-(void)close:(id)sender
{
//
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{ cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
UILabel *dateLabel = [[UILabel alloc]init];
dateLabel.frame = CGRectMake(85.0f, 6.0f, 200.0f, 20.0f);
dateLabel.tag = tag1;
[cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator];
cell.contentView.frame = CGRectMake(0.0f, 0.0f, 320.0f, 80.0f);
[cell.contentView addSubview:dateLabel];
[dateLabel release];
}
// Set up the cell...
//[(UILabel *)[cell viewWithTag:tag1] setText:@"Date"];
cell.textLabel.text = @"Date";
return cell;
}
But the control is not entering into the tableView: method. So I could not see any label in my table. How can I make this ?
Thank You
I have a main application, and a bunch of sub-applications (they are separate apps, which do not appear on the android home dashboard). I was planning on having a SQLite DB which the main app maintains, and get a list of available sub-apps from. Is there a way to update this main database as the user installs the sub-apps?
Two alternative I was thinking of include:
User installs the sub-apps via the main app, which would then update the DB.
Rather than use the DB to find all installed sub-apps, have each sub-app declare a category, and use intents to query for all applications which match that query (is this even possible? if so, advice is welcomed).
Thanks!
I have a method called like this...
-(void)dbUpdate:(int)forId {
Which contains this sqlite to bind and update a database.
sqlite3_bind_int(UPDATE_ACCOUNT, 3, forId);
When I run the query, it doesn't give me an error, but it doesn't update the database either.
If I change this line of code...
sqlite3_bind_int(UPDATE_ACCOUNT, 3, forId);
manually, to...
sqlite3_bind_int(UPDATE_ACCOUNT, 3, 6);
the query runs 100% fine, as expected.
Changing the variable to an actual integer proves to me that the variable 'forId' isn't being passed or bound to the query properly.
What am I doing wrong? How is the best way to pass an Integer (and make sure it is an Integer) into an sqlite bind?
Cheers,
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!
Is there anyway to store audio on an iphone app and then grab that audio file and play it through code. Does anyone have a tutorial to point me to do something like this?
I have a tableview that my app shows when it loads, I would like to somehow put a banner at the bottom that if connceted to the internet will check my server for any new image files and if there are it will replace the current one and if not it will just leave it. That way I can constantly display messages to my users - sort of like in Doodle Jump.
How could I achieve this?
Thanks
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.
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 ??
I have seen a lot of posts about this, and it seems like the code below should work. I have created an SD Card image and added it to the emulator (and that works fine).
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType("image/*");
//intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(intent, 1);
It does launch and allow selection of images, but when I click on an image, everything exits and the emulator returns to the home screen, not the back to my app. My onActivityResult is never called either.
What am I missing?
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?