Monday, 6 May 2013

Handling the special symbols while retrieving from database

If you have any new characters(other than alphabets/other language) in your database and for retrieving the characters as it is into your project , you need to change the type of that entity as TEXT. If you set that type as TEXT in database ,then you can retrieve whatever symbols /characters present in the database.

If you got any unwanted special symbols in the database itself, you need to manually edit the database.

Handling unrelated animation issues

Hi all,

After setting the animations for a view,you need to commit the animations.

     [UIView beginAnimations:nil context:NULL];
     [UIView setAnimationDuration:0.3f];
     [UIView setAnimationDelegate:self];

     [UIView commitAnimations];

Otherwise those animations will be applied to all the next views so that the entire project will be effected by unrelated and unhandled animations.

Tuesday, 30 April 2013

Monday, 29 April 2013

Adding Animation for loading screen

Hi Team,
I am sharing the source code of adding animation for loading image when the application is being launched.


-(void)fadeSplashView{
    
    splashView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 320, 480)];
    splashView.image = LOADINGIMAGE;
    splashView.animationImages = LOADINGIMAGES;
    splashView.animationDuration = 1;
    splashView.animationRepeatCount = -1;
    [splashView startAnimating];
    
    [self.window addSubview:splashView];
    [self.window bringSubviewToFront:splashView];
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:3];
    [UIView setAnimationDelay:0.5];
    [UIView setAnimationTransition:UIViewAnimationTransitionNone forView:self.window cache:YES];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationDidStopSelector:@selector(removeSubView)];
    splashView.alpha = 0.0;
    [UIView commitAnimations];
    
    //Adding activity indicator on splash view
    UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
    indicator.color = [UIColor blackColor];
    indicator.alpha = 1.0;
    indicator.center = CGPointMake(150, 390);
    indicator.hidesWhenStopped = NO;
    [splashView addSubview:indicator];
    [indicator startAnimating];
}

-(void)removeSubView{
    [splashView removeFromSuperview];
}

Create UIImageView object in your AppDelegate.h file and Call "FadeSplashView" method in your "didFinishLauching" method of your AppDelegate.m file.

Here, i have prepared a macro LOADINGIMAGES for array of images.
For array of images that are for animating the loading screen, you should prepare the images according to your loading image.

Please send the comments if you have any queries..
Thank you




Friday, 26 April 2013

How to send the Animated Image(.gif) thru Email in iOS?

Hi all,
     I want to post the animated image thru Email.But when I use the link of animated image, then  the image is animated in Email body.
I used below code for sending animated image (http://php.eminosoft.com/emoji/images/beautiful.gif is having the animated image).

Code:

 MFMailComposeViewController *mailView = [ [MFMailComposeViewController alloc]init];
  if([MFMailComposeViewController canSendMail])
  {
          mydata = [[NSData alloc]initWithContentsOfURL:[NSURL URLWithString:http://php.eminosoft.com/emoji/images/beautiful.gif]]];
         [mailView setSubject:@"Emoji app"];
            
            [mailView addAttachmentData:mydata mimeType:@"image/gif" fileName:@"beautiful"];
           
            mailView.mailComposeDelegate = self;
            [self presentModalViewController:mailView animated:YES];
            [mydata release];
            [mailView release];


Is there any other ways to send the animated image with out using the link.

Thanks in Advance..

Wednesday, 24 April 2013

How to add a view to Tableview Footer?

Hi
I want to add a view to footer of the tableview which is  embedded with UITableViewController. I Have added a view like below:

-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
   speedDialView  = [[UIView alloc] init];
   UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
 [button setFrame:CGRectMake(10, 3, 65, 50)];
[button setBackgroundImage:CALL_ICON forState:UIControlStateNormal];
    [button addTarget:self action:@selector(speedDial)
     forControlEvents:UIControlEventTouchUpInside];
    [speedDialView addSubview:button];
    return speedDialView;

}

I have added button successfully, but i could not add any other views beside that button.
Can any one help me out?
Thanks in advance..



Tuesday, 23 April 2013

O Linker Error: File is universal (three slices), but it does not contain a(n) ARMv7-s slice error for static libraries on iOS

Go to

Build Settings --> Build Active Architecture only  turn 'NO' to 'YES'. it will work out

for more clarification

http://stackoverflow.com/questions/12402092/file-is-universal-three-slices-but-it-does-not-contain-an-armv7-s-slice-err