Archive for the ‘ XCode ’ Category

Hi, iOS , objective-c , xcode Today i’ll show you the best way to drag and drop or move objects using touch events , i’ll use this two functions that you can implement them in any ViewController:

touchesBegan : will be active at the first moment of moving object , it’s will be active [...]

objective c merge two images

Hi; This function below is to merge two images UIImage and return UIImage , in the header file copy and past the function definition below: +(UIImage*)MergeImage:(UIImage*)img1 withImage:(UIImage*)img2;

objective c fade animation UIImageView

xcode – iOS – objective-c Hi; How to make fade in or fade out animation for “or on” UIImageView object in Objective-c ” iOS” you want to use UIVew class and UIImageView object “myImage” 1-    UIView : beginAnimations : context // to tell that the animation options will start !! 2- UIView setAnimationCurve // to [...]

objective c UITableView change row cell height

xcode – iphone – objective-c Hi; the code below shows how to change UITableView ” table view ” cell or row height by using [ UITableView : heightForRowAtIndexPath ] ” Asks the delegate for the height to use for a row in a specified location “

objective c UITableView edit table view rows

xcode – iphone -objective-c Hi; to edit ” delete or select ” rows or cells of table view , you can use [ UITableView : setEditing ] “A Boolean value that determines whether the receiver is in editing mode”

objective c UITableView delete selected rows

xcode – iphone – objective-c Hi; if you want to know my way of deleting selected rows from table view so maybe you choose the easiest way to delete selected rows or cells from UITableView :

objective c iphone delete file

xcode – iphone – objective c Hi; the method “function” below is an example how to delete file using file manager “NSFileManager” [ NSFileManager : removeItemAtPath: error ] “Removes the file or directory at the specified path.” , you can use this method “function” to do this.

xcode – iphone – objective c Hi; the example below show how to delete all rows cells from table view , but note that you must remove all objects of using array , and then use [UITableView : reloadData] “Reloads the rows and sections of the receiver”

Objective c parse file name from path

xcode – iphone – objective c Hi; the line code below show how to get or parse file name from full path using [NSString : lastPathComponent]

xcode – iPhone – Objective c if you have file path and want to get file extension you can use [NSString : pathExtension] “Interprets the receiver as a path and returns the receiver’s extension, if any.” , “myFile.txt” will return “txt”