Thursday, January 27, 2011

XCode tips and Tricks

Adding an icon to the table view

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

NSString *imgSource = [[NSBundle mainBundle] pathForResource:@"ICN1" ofType:@"jpg"];

UIImage *img = [UIImage imageWithContentsOfFile: imgSource];

cell.image = img;

}

Text alignment

cell.textLabel.textAlignment = 2 ;

Showing Alert

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Blue View Button Pressed" message:@"You Pressed a button on the blue view" delegate:nil cancelButtonTitle:@"Yep, I did." otherButtonTitles:nil];

[alert show];

[alert release];

Animating Images

// create the view that will execute our animation

UIImageView* ImageView = [[UIImageView alloc] initWithFrame:self.view.frame];

// load all the frames of our animation

ImageView.animationImages = [NSArray arrayWithObjects:

[UIImage imageNamed:@"1.png"],

[UIImage imageNamed:@"2.png"],

[UIImage imageNamed:@"3.png"],

nil];

// all frames will execute in 1.75 seconds

ImageView.animationDuration = 1.75;

// repeat the annimation forever

ImageView.animationRepeatCount = 0;

// start animating

[ImageView startAnimating];

// add the animation view to the main window

[self.view addSubview:ImageVie

Thursday, October 28, 2010

Shake SMS App for iPhone

I have just started the development of the Shake SMS app for iPhone . It will be similar to the one for Nokia N95.

Doing Research for it . . . .

My FYP


I have worked on an application for iPhone. This project is related to concept of Net-centric warfare. A portable platform like iPhone will provide access to real time info needed for decision making, security planning and surveillance. The application will be accessing data through using Wi-Fi and tactical radios and will also provide control over UAVs from any location in field. The aim of the project is to develop an application that is capable of acquiring and displaying real time imagery from UAVs or any remote video server and displaying information regarding vehicles / UAVs: GPS location, direction, speed, trail and altitude. The application will show the user information regarding vehicles / UAVs make, type and characteristics; furthermore it will also provide a customizable list of UAVs / vehicles and also locate them on the map.









Wednesday, August 5, 2009

Friday, July 31, 2009

VB Macros : Extract out filename

To extract the file name use the following code :

Dim fileName As String
Dim Location As Integer

fileName= ActiveDesignFile.Name
Location = InStrRev(fileName, ".", -1)
fileName = Mid(fileName, 1, Location - 1)

Now What this code will do is that it will extreact out the name of the file for eample if the file name is "example.txt" it will return you "example" int the string fileName

VB Macros : Code to convert String to Byte Array

Use StrConv function with "vbFromUniCode" to convert a VB String to a byte array of ANSI Charecters

Here is the Code

Dim srcString As String
Dim destArr() As Byte

secString = ActiveDesignFile.Name ' You can place any string here
destArr = StrConv(srcString, vbFormUniCode)

What this will do is that it will take your string, convert each charecter to ANSI, and store it in the designated array.