Monday, August 3, 2009

Map View in iPhone

#import "MatchProfile_MapController.h"
#import "POL.h"

@implementation MatchProfile_MapController
@synthesize intTag1;

- (void)viewDidLoad {

self.navigationItem.title=@"Select Person";
appdelegate=[[UIApplication sharedApplication]delegate];

for(int i=0;i<[appdelegate.arrayRecentCompatible count];i++)
{
NSMutableDictionary *dic=[appdelegate.arrayRecentCompatible objectAtIndex:i];

CLLocationCoordinate2D coord;
coord.latitude =[[dic valueForKey:@"Latitude"] doubleValue];
coord.longitude =[[dic valueForKey:@"Longitude"] doubleValue];

POL *poi = [[POL alloc] initWithCoords:coord];
poi.title =[dic valueForKey:@"Name"];
poi.subtitle =[dic valueForKey:@"Country"];
poi.img1=[UIImage imageNamed:[dic valueForKey:@"Image"]];
poi.intTag=i;
[mapView addAnnotation:poi];
}

mapView.delegate=self;

MKCoordinateRegion zoomIn = mapView.region;
zoomIn.span.latitudeDelta *=5;
[mapView setRegion:zoomIn animated:YES];
[super viewDidLoad];
}
- (MKAnnotationView *) mapView:mapView viewForAnnotation:(id ) annotation
{

newAnnotation = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@""];
[newAnnotation setPinColor:MKPinAnnotationColorGreen];
newAnnotation.animatesDrop = YES;
newAnnotation.canShowCallout = YES;
POL *TempPOL=(POL*) annotation;

UIButton *btnRow1=[[UIButton buttonWithType:UIButtonTypeCustom]retain];
btnRow1.frame=CGRectMake(0, 0, 25, 30);
[btnRow1 setBackgroundImage:TempPOL.img1 forState:UIControlStateNormal];
[btnRow1 addTarget:self action:@selector(selectUSer:) forControlEvents:UIControlEventTouchUpInside];
btnRow1.tag=TempPOL.intTag;
newAnnotation.leftCalloutAccessoryView=btnRow1;

UIButton *btnRow2=[[UIButton buttonWithType:UIButtonTypeDetailDisclosure]retain];
[btnRow2 addTarget:self action:@selector(selectUSer:) forControlEvents:UIControlEventTouchUpInside];
btnRow2.tag=TempPOL.intTag;
newAnnotation.rightCalloutAccessoryView=btnRow2;
return newAnnotation;
}

#pragma mark -
#pragma mark Memory methods

- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}

- (void)viewDidUnload {
}

- (void)dealloc {
[super dealloc];
}


#pragma mark -
#pragma mark Methods

-(IBAction)selectUSer:(id)sender
{
if(objProfile==nil)
objProfile=[[ProfileViewController alloc]initWithNibName:@"ProfileViewController" bundle:nil];

for(int i=0;i<4;i++)
{
NSMutableDictionary *dic=[appdelegate.arrayRecentCompatible objectAtIndex:i];

UIButton *btn=(UIButton*)sender;

if(btn.tag==i)
{
objProfile.intPerson=i;
objProfile.strTitle=[dic valueForKey:@"Name"];
}
}

[self.navigationController pushViewController:objProfile animated:YES];
}

@end

364 days left to launch iPhone 4G

Now that the iPhone 3G S is officially behind us, let me be the first--or at least one of the first--to announce the countdown to the next new iPhone. If history is any indication, it should show up right around this time next year.Interestingly, even though the 3G S is technically Apple's third-generation iPhone, some tech pundits were expecting the iPhone 3G S to be called the iPhone 4G. But you could also argue that the iPhone 3G S is more like the iPhone 3.5G, which doesn't have the greatest ring.There's also a chance that in between the iPhone 3G S and iPhone 4G (or whatever it's called), we might see a totally new branch of iPhone, something akin to an iPhone Mini or Lite.I'm not sure Apple needs to answer to the smaller form factor of the Palm Pre, but there are some people out there who think the iPhone's just a tad too big. And there are some people who want a physical keyboard, but don't count on Apple slipping in a slide-out keyboard anytime soon.

All that said, I do think next year's iPhone will feature a new design that also includes a new screen. Some mock-ups floating around have suggested the aluminum unibody design of the new MacBooks. That's possible, but so are a host of other innovative industrial designs.
The point is, the next go-round, it's probably not enough to just stick with upgraded internal components. Some significant cosmetic changes will be required to differentiate the generations and more easily entice upgrades by existing iPod owners. And I'm not talking matte vs. shiny finish.Ultimately, however, it's what's inside that counts and consumers are always wanting faster, more powerful smartphones with more memory that somehow manage to be more energy-efficient and offer better battery life. There's already talk of the next iPhone having a dual-core processor and better graphics chips that can deliver higher video resolutions and better still images when taking pictures (read Brooke Crothers' story on new ARM chips here).The question is whether Apple can continue to increase battery life at the same time. In fact, one big reason a lot of people are interested in upgrading from the 3G to the 3G S is because of the improved battery life.Beyond the hardware, there are still features concerns to address (everybody has their wishlist) and more importantly, carrier and pricing plan issues. Someday, some other carrier, perhaps Verizon, which is preparing to build out a 4G network, will get the iPhone. And someone, maybe Apple, will declare that iPhone the iPhone 4G. Or maybe it'll just be the 3G V. All I know is that come this time next year, we'll most likely be seeing a new iPhone. And it will be here before you know it.

Comments? Aside from a carrier choice, what are looking for in a true 4G iPhone?

Finding and Viewing Locations

For important information about driving and navigating safely, see the Important Product Information Guide.Maps provides street maps, satellite photos, a hybrid view, and street views of locations in many of the world’s countries. You can get detailed driving, public transit, or walking directions and traffic information. Find and track your current (approximate) location, and use your current location to get driving directions to or from another place. The built-in digital compass lets you see which way you’re facing. (iPhone 3GS only).

Note: Maps, digital compass (iPhone 3GS only), directions, and location-based applications provided by Apple depend on data collected and services provided by third parties. These data services are subject to change and may not be available in all geographic areas, resulting in maps, compass headings, directions, or location-based information that may be unavailable, inaccurate, or incomplete. Compare the information provided on iPhone to your surroundings and defer to posted signs to resolve any discrepancies. In order to provide your location, data is collected in a form that doesn’t personally identify you. If you don’t want such data collected, don’t use the feature. Not using this feature won’t impact the non–location-based functionality of your iPhone.

Find a location and see a map:

1. Tap the search field to bring up the keyboard.

2. Type an address, intersection, area, landmark, bookmark, contact, or zip code.

3. Tap Search.

Sunday, August 2, 2009

Hacking iPhone by Hackers


Canadian iPhone users may want to think about hanging up for a while if two hacker heavyweights prove they can infiltrate the system and put a worm inside the Apple.

Charlie Miller and Collin Mulliner say they've found a security-weakness in Apple's iPhone which would allow a hacker to gain control of the device by sending one single SMS - or text message - and they're giving a how-to talk Thursday at the 2009 Black Hat security conference in Las Vegas.

Once the technique is made public, it won't be long before it ends up going viral on YouTube and hacker message boards around the globe.Miller, one of the top computer hackers in the U.S. and Mulliner, a PhD student at Technical University of Berlin, focusing on the security of mobile devices, say they found the vulnerability in June and alerted Apple to the problem, but the computer giant hasn't come out with any official statement or a security update to combat the problem. Apple didn't immediately return calls to Canwest News Service Thursday.

Canadian Tech-guru, Jesse Hirsh says if the hackers have cracked the code there is little iPhone users can do, for now.

Almost every mobile-phone user, worldwide, uses text-messaging daily, if not hourly, so Canada's iPhone users are just as vulnerable as those in the rest of the world, said Hirsh.

He said users should think of the iPhone as a computer, which is vulnerable to hacking.



iPhone 3GS

iPhone 3GS is the latest iPhone launched by apple.

If it ain't broke, don't fix it -- right? We know countless reviews of the iPhone 3GS may begin with that cliché, but there's little chance you'd find a better way to describe the strategy that Apple has just put into play with its latest smartphone. In many ways, the 3GS is a mirror image of the iPhone 3G; externally there's no difference. It's inside where all the changes have happened, with Apple issuing a beefed-up CPU, new internal compass, larger capacities for storage, and improved optics for its camera. More to the point, the release of the 3GS coincides with the launch of iPhone OS 3.0, a major jump from previous versions of the system software featuring highly sought after features like cut, copy, and paste, stereo Bluetooth, MMS, tethering, video recording, landscape keyboard options for more applications, and an iPhone version of Spotlight. At a glance, what Apple seems to be doing is less a reinvention of the wheel and more like retreading the wheel it's already got (and what a wheel, right?). So, do the iPhone 3GS and OS 3.0 tweak the details in just the right places, or has Apple gone and gotten lazy on us? Read on to find out.