Rounded corner textview in ios

Rounded corner textview in ios

Include Quartzcore framework in .h file

#import <QuartzCore/QuartzCore.h>

//Implementation

messageTxt.layer.cornerRadius = 5.0;

messageTxt.clipsToBounds = YES;

JCL EXCEPTION HANDLING – addressing exception error

JCL EXCEPTION HANDLING

What is an addressing exception error?

An addressing exception error occurs when a program is attempting to access a memory location, which is outside the bounds of a available real storage on the machine. This can be caused by a dataset not being open end at the time an I/O was directed to it, an attempt to close a dataset a second time, incorrectly called module parameters or coding, improper exit from a performed paragraph, or uninitialized subscript or index. The system completion code is 0C5.

JCL EXCEPTION HANDLING – Protection Exception error

JCL EXCEPTION HANDLING

What is a Protection exception error?

A protection exception error occurs when the program is attempting to access a memory address that is not within the memory area that the program is authorized to use. Some of the causes may be a subscript or index that is not initialized or has taken on a value outside the bounds of the table with which it is associated, an attempt to read an open end file, or an incorrect or missing DD statement. The System completion code is 0C4.

JCL EXCEPTION HANDLING – Operation Exception error

JCL EXCEPTION HANDLING

What is an Operation Exception error?

An Operation exception error indicates that an operation code is not assigned or the assigned operations not available on a particular computer model. The machine does not recognize the instruction or operation used. A possible reasons a subscript error. This error could also be caused by an attempt to read a file that was not opened, a misspelled DD statement. The system completion code is 0C1.

How to activate F7 and F8 in REXX?

How to activate F7 and F8 in REXX

Normally function key F7 and F8 is disable in REXX panel we have to activate them.

In panel design you have add this code to activate F7 and F8.

)ATTR
% AREA(SCRL) EXTEND(ON)

%AREAS
)AREA AREAS

…………

panel design code above can able to scroll down or up using function key F7 and F8.

ios-custom the size of UIModalPresentationFormSheet

ios-custom the size of UIModalPresentationFormSheet

Follow this example code to customize the size of  form sheet in ios

ModalViewController *exampleController = [[[ModalViewController alloc] init] autorelease];
exampleController.modalPresentationStyle = UIModalPresentationFormSheet;
exampleController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; ¬†//transition shouldn’t matter
[self presentModalViewController:exampleController animated:YES];
exampleController.view.superview.frame = CGRectMake(0, 0, 200, 200);//it’s important to do this after presentModalViewController
exampleController.view.superview.center = self.view.center;

To display a imagename of the uploaded image from ipad

To display image name of uploaded image from iphone gallery

In ios there is function to fetch the image name of the uploaded image but it will ask the permission for the user to access the gallery if you allow then you can able to fetch the name easily

Follow the simple steps to get the image name in ios

Add the alsset framework first

 

With the help of ALAsset you can able to achieve this.

Step 1: Get the Asset for the selected Image from the UIImagePicker
Step 2: Get the ALAssetRepresentation for that Asset.
Step 3: ALAssetRepresentation class has a property called fileName
– (NSString *)filename
Returns a string representing the filename of the representation on disk.
This Sample Code will Helps you…
– (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {

NSURL *imageURL = [info valueForKey:UIImagePickerControllerReferenceURL];
ALAssetsLibraryAssetForURLResultBlock resultblock = ^(ALAsset *myasset)
{
ALAssetRepresentation *representation = [myasset defaultRepresentation];
NSString *fileName = [representation filename];
NSLog(@”fileName : %@”,fileName);
};

ALAssetsLibrary* assetslibrary = [[[ALAssetsLibrary alloc] init] autorelease];
[assetslibrary assetForURL:imageURL
resultBlock:resultblock
failureBlock:nil];

Add UIsearch bar as subview of UInavigationbar in iOS

Add UIsearch bar as subview of UInavigationbar in iOS

To add UIsearch bar as subview of UINavigation bar

 

/* Search bar function starts*/
theSearchBar = [[UISearchBar alloc]
initWithFrame:CGRectMake(650.0f,20.0f,250.0f,0.0f)];
theSearchBar.tintColor = UIColorFromRGB(0x2C688B);
//self.navigationItem.titleView = theSearchBar;
theSearchBar.delegate = self;
theSearchBar.autoresizingMask = UIViewAutoresizingNone;
//self.navigationItem.titleView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
//self.tabBarController.navigationController.topViewController.navigationItem.titleView = theSearchBar;
[self.navigationController.navigationBar addSubview:theSearchBar];
/* Search bar function ends*/

Dismiss the keyboard when click the search button in ios

Dismiss the keyboard when click the search button in ios

Follow the below steps to dismiss the keyboard when click the search button in the keyboard.

 

This is the default function of searchbar delegate so add this function in .m file

– (void)searchBarSearchButtonClicked:(UISearchBar *)searchBar
{
[searchBar resignFirstResponder];
// Do the search…
}

What is the difference between Mage::getSingletone() and Mage::getModel() in Magento?

The difference between Mage::getSingletone() and Mage::getModel() in Magento

Mage::getSingletone() always finds for an existing object if not then create that a newobject but Mage::getModel() always creates a new object.

 

Analytic Code