ArchiveSeptember 2012

How to keep original orientation of the UIImage..

H

Hello All, While working on an application, I was having the client’s requirement that, while displaying an image in imageview the image must be of same orientation same as the original. After googling, I got the way for doing this. Here is the way, UIImage *image; //Here assign the image which you want UIImageView *imageView = [[UIImageView alloc] init]; imageView.image = image; imageView...

Showing a Popover in iPad

S

The UIPopoverController class (for iPad) is a very neat way to present information to the user. In this blog, we’ll show how to use this class to present a popover view when the user touches a button. Let’s see how it works. Start Xcode, click on “Create a new Xcode project,” and select the Single View Application template. Name the project PopoverDemo, and choose options as shown here: Click...

Memory Management in iPhone applications

M

Hi, Recently, I came to an issue of memory leakage while developing an application. And that was the frustrating experience. And it taught a big lesson. Every time I was running application on device, it was crashing the app after some memory warning. It was the indication that my application was utilizing lot of memory. In my code, I had allocated lot of arrays but had not released them after...

Shaking Animation of an UIView

S

  Hello friends, Here we will learn how to add shaking animation to an UIView. It’s just an CABasicAnimation, CABasicAnimation* anim = [CABasicAnimation animationWithKeyPath:@”transform.rotation”]; [anim setToValue:[NSNumber numberWithFloat:0.0f]]; [anim setFromValue:[NSNumber numberWithDouble:M_PI/30]]; // rotation angle [anim setDuration:0.1]; [anim...

How to merge two UIImages programmatically?

H

Hi all, While developing an application I came to this issue. I was suppose to merge 2 images programmatically. I googled a little bit and found a function, then I modified it as follows for my requirements -(UIImage *) mergeTwoImages: (UIImage *)bottomImage : (UIImage *)upperImage : (CGRect)rect { UIImage *image = upperImage; CGSize newSize = CGSizeMake(bottomImage.size.width, bottomImage.size...

How to send email through salesforce apex?

H

  Class Code: public class clsTest { public Boolean emailSent { get; set; } public void sendMail(string email){ Messaging.SingleEmailMessage mailHandler = new Messaging.SingleEmailMessage(); String[] emailRecipient = new String[]{email}; //set the recipient mailHandler.setToAddresses(emailRecipient); //set the reply email address mailHandler.setReplyTo('juilee.joshi@nanostuffs.com');...

Unable to access Products from Salesforce.com Partner Portal [Solved]

U

Hi Folks, I was trying to setup a Salesforce.com Partner Portal for one of my client and realized that no matter I give Read access to Gold Partner User profile, I still cant see Products when logged in as a partner in the partner portal. Additionally, When you goto Setup -> Customize -> Partners -> Settings -> Customize Portal Tabs, I cant at all see Products as an option in the list...

How to use Visualforce IDs in jQuery

H

Prerequisites: You will need to download the jQuery and jQuery UI libraries. jQuery is the core library which offers DOM manipulation methods and jQuery UI is a higher level library which constructs widgets for use on your page. From the jQuery UI site, you can download a zip tailored to the portions of the libraries you need.Once you have the ZIP in hand, you’ll need to upload it as a static...

Category