<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Objective C Examples</title>
	<atom:link href="http://www.exampledb.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.exampledb.com</link>
	<description>Objective C,Delphi,Php, Mysql, Sql server, Photoshop and others</description>
	<lastBuildDate>Fri, 29 Mar 2013 09:01:51 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>objective-c Touch Move Drag and Drop Object UIImageView</title>
		<link>http://www.exampledb.com/objective-c-touch-move-drag-and-drop-object-uiimageview.htm</link>
		<comments>http://www.exampledb.com/objective-c-touch-move-drag-and-drop-object-uiimageview.htm#comments</comments>
		<pubDate>Fri, 29 Mar 2013 09:01:51 +0000</pubDate>
		<dc:creator>Eng.Ahmed AlSadi</dc:creator>
				<category><![CDATA[Objective C]]></category>
		<category><![CDATA[XCode]]></category>
		<category><![CDATA[Xcode UI examples]]></category>
		<category><![CDATA[image view touch]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[move image on touch]]></category>
		<category><![CDATA[move object]]></category>

		<guid isPermaLink="false">http://www.exampledb.com/?p=486</guid>
		<description><![CDATA[Hi, iOS , objective-c , xcode Today i&#8217;ll show you the best way to drag and drop or move objects using touch events , i&#8217;ll use this two functions that you can implement them in any ViewController: [crayon-519aa8f3adc47/] touchesBegan : will be active at the first moment of moving object , it&#8217;s will be active [...]]]></description>
				<content:encoded><![CDATA[<p>Hi,<br />
iOS , objective-c , xcode</p>
<p>Today i&#8217;ll show you the best way to drag and drop or move objects using touch events , i&#8217;ll use this two functions that you can implement them in any ViewController:</p><pre class="crayon-plain-tag">-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event</pre><p><span style="color: #808000;">touchesBegan</span> : will be active at the first moment of moving object , it&#8217;s will be active once per moving operation .</p>
<p><span style="color: #808000;">touchesMoved</span> : will be active all the time you do moving the object.</p>
<p>OK , Let&#8217;s see how to move drag and drop object by this touch functions:</p>
<p>1- my object is UIImageView &#8220;imageView&#8221; with name (imgTest)<br />
2- the most important thing is to active UserInteraction in UIImageView to be active with touch events , you can do it in &#8220;viewDidLoad&#8221; function</p><pre class="crayon-plain-tag">[[self imgTest]setUserInteractionEnabled:YES];</pre><p>3- implement or add the two touch event functions &#8220;touchesBegan , touchesMoved&#8221; in your ViewController</p>
<p>4- define the following variables as class scope variables:</p><pre class="crayon-plain-tag">//Save the first touch point
CGPoint firstTouchPoint;

//xd,yd destance between imge center and my touch center
float xd;
float yd;</pre><p>5- in &#8220;touchesBegan&#8221; function check if the touched object is (imgTest) or not , and if(YES)&#8211; save touch point CGPoint , and calculate xd it&#8217;s the deference between touched point x-axes and object centre y-axes and yd deference y-axes</p><pre class="crayon-plain-tag">-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    UITouch* bTouch = [touches anyObject];
    if ([bTouch.view isEqual:[self imgTest]]) {
        firstTouchPoint = [bTouch locationInView:[self view]];
        xd = firstTouchPoint.x - [[bTouch view]center].x;
        yd = firstTouchPoint.y - [[bTouch view]center].y;
    }
}</pre><p>&nbsp;<br />
6- in &#8220;touchesMoved&#8221; function , start moving the object (imgTest) after checking the touching object by change centre x,y as below :</p><pre class="crayon-plain-tag">-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
    UITouch* mTouch = [touches anyObject];
    if (mTouch.view == [self imgTest]) {
        CGPoint cp = [mTouch locationInView:[self view]];
        [[mTouch view]setCenter:CGPointMake(cp.x-xd, cp.y-yd)];
    }
}</pre><p><a href="http://www.exampledb.com/wp-content/uploads/2013/03/TouchAndMove4.zip">you can download fully GUI example here &#8221; Xcode 4.6 &#8220;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.exampledb.com/objective-c-touch-move-drag-and-drop-object-uiimageview.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>objective c merge two images</title>
		<link>http://www.exampledb.com/objective-c-merge-two-images.htm</link>
		<comments>http://www.exampledb.com/objective-c-merge-two-images.htm#comments</comments>
		<pubDate>Mon, 25 Mar 2013 17:31:38 +0000</pubDate>
		<dc:creator>Eng.Ahmed AlSadi</dc:creator>
				<category><![CDATA[Objective C]]></category>
		<category><![CDATA[XCode]]></category>
		<category><![CDATA[merge two images]]></category>
		<category><![CDATA[objective c]]></category>

		<guid isPermaLink="false">http://www.exampledb.com/?p=482</guid>
		<description><![CDATA[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; MergeImage function with parameters UIImage,UIImage and return value is UIImage, then past the function code in the .m source file &#160; [crayon-519aa8f3b1908/] &#160; this code is to merge [...]]]></description>
				<content:encoded><![CDATA[<p>Hi;<br />
This function below is to merge two images UIImage and return UIImage ,</p>
<p>in the header file copy and past the function definition below:</p>
<p>+(UIImage*)MergeImage:(UIImage*)img1 withImage:(UIImage*)img2;<span id="more-482"></span></p>
<p>MergeImage function with parameters UIImage,UIImage and return value is UIImage,<br />
then past the function code in the .m source file</p>
<p>&nbsp;</p><pre class="crayon-plain-tag">/**
 *Merge two Image @ 0,0
 */
+(UIImage*)MergeImage:(UIImage*)img1 withImage:(UIImage*)img2
{
    //return value
    UIImage* result = nil;

    //convert image1 from UIImage to CGImageRef to get Width and Height
    CGImageRef img1Ref = img1.CGImage;
    float img1W        = CGImageGetWidth(img1Ref);
    float img1H        = CGImageGetHeight(img1Ref);

    //convert image2 from UIImage to CGImage to get Width and Height
    CGImageRef img2Ref = img2.CGImage;
    float img2W        = CGImageGetWidth(img2Ref);
    float img2H        = CGImageGetHeight(img2Ref);

    //Create output image size
    CGSize size = CGSizeMake(MAX(img1W, img2W), MAX(img1H, img2H));

    //Start image context to draw the two images
    UIGraphicsBeginImageContext(size);

    //draw two images in the context
    [img1 drawInRect:CGRectMake(0, 0, img1W, img1H)];
    [img2 drawInRect:CGRectMake(0, 0, img2W, img2H)];

    //get the result of drawing as UIImage
    result = UIGraphicsGetImageFromCurrentImageContext();

    //End and close context
    UIGraphicsEndImageContext();

    //release All CGImageRef 's
    CGImageRelease(img2Ref);
    CGImageRelease(img1Ref);

    //return value :)
    return result;
}</pre><p>&nbsp;</p>
<p>this code is to merge two images only , if you want to merge more than two images you can use this function more than once , or you can add more parameters to the function as you want and repeat</p><pre class="crayon-plain-tag">CGImageRef imgXRef = imgX.CGImage;
    float imgXW        = CGImageGetWidth(imgXRef);
    float imgXH        = CGImageGetHeight(imgXRef);
   .
   .    
    //Create output image size
    CGSize size = CGSizeMake(MAX(all images widths), MAX(all images hieghts);

    //draw two images in the context
    [imgx drawInRect:CGRectMake(0, 0, imgxW, imgxH)];</pre><p>in imgx mean image numbe x = (1,2,3,4,&#8230;)</p>
<p>&nbsp;</p>
<p>another note<br />
this function merge images at point x=0 and y=0 , so if you want to change this location on the final result image , you can change the 0,0 in the draw lines like this</p><pre class="crayon-plain-tag">[img1 drawInRect:CGRectMake(10, 25, imgxW, imgxH)];</pre><p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exampledb.com/objective-c-merge-two-images.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>how to build openCV for iOS &#8221; easy way &#8220;</title>
		<link>http://www.exampledb.com/how-to-build-opencv-for-ios-easy-way.htm</link>
		<comments>http://www.exampledb.com/how-to-build-opencv-for-ios-easy-way.htm#comments</comments>
		<pubDate>Fri, 08 Mar 2013 06:41:40 +0000</pubDate>
		<dc:creator>Eng.Ahmed AlSadi</dc:creator>
				<category><![CDATA[ios openCV]]></category>
		<category><![CDATA[Objective C]]></category>
		<category><![CDATA[build opencv]]></category>
		<category><![CDATA[ios opencv]]></category>
		<category><![CDATA[opencv iphone]]></category>
		<category><![CDATA[opencv2.framework]]></category>

		<guid isPermaLink="false">http://www.exampledb.com/?p=477</guid>
		<description><![CDATA[&#160; how to build openCV for iOS iphone,ipad and iPod touch &#8221; easy way &#8221; if you want to build and install and use openCV in your iOS projects for iPhone, iPad or iPod Touch  so you can use this link to do this and get opencv2.framework to add it in your project. but if [...]]]></description>
				<content:encoded><![CDATA[<p>&nbsp;<br />
how to build openCV for iOS iphone,ipad and iPod touch &#8221; easy way &#8221;</p>
<p>if you want to build and install and use openCV in your iOS projects for iPhone, iPad or iPod Touch  so you can use t<a title="openCV iOS" href="http://docs.opencv.org/trunk/doc/tutorials/introduction/ios_install/ios_install.html" target="_blank">his link to do this and get opencv2.framework </a>to add it in your project.</p>
<p><span style="color: #ff6600;">but if you faced any error during building openCV for ios,</span> so you want to use this easy way to build and compile it for iOS objective-c <img src='http://www.exampledb.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>1- install MacPorts<br />
<a href="http://www.macports.org/install.php" target="_blank">http://www.macports.org/install.php</a></p>
<p>2- open terminal and write</p><pre class="crayon-plain-tag">sudo port -v selfupdate</pre><p>to update MacPorts<br />
3- in terminal write</p><pre class="crayon-plain-tag">sudo port -v install opencv +python27</pre><p>this line will download opencv with some requirements in /opt folder<br />
4- after installing finished , go to path <span style="color: #008080;">&#8221; /opt/local/var/macports/distfiles/opencv &#8220;</span> you will find <span style="color: #008000;">OpenCV-2.4.3.tar.bz2</span> file , extract it to &#8221; <span style="color: #008000;">OpenCV-2.4.3</span> &#8221; folder on any place you want, and in terminal cd into this folder</p><pre class="crayon-plain-tag">cd OpenCV-2.4.3/ios
python build_framework.py iosFolder</pre><p>, where <span style="color: #008000;">iosFolder</span> is the new folder that the python will build <span style="color: #008000;">opencv2.framwork</span> on it.<br />
5- now after building finished , go to <span style="color: #008000;">iosFolder</span> you will find <span style="color: #008000;">opencv2.framework</span> folder , and that&#8217;s it , you can add it to your project <img src='http://www.exampledb.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&nbsp;<br />
<span style="text-decoration: underline;"><span style="color: #000000; text-decoration: underline;">Adding opencv2.framework to ios project:</span></span></p>
<p>1- copy opencv2.framework to root folder or your project , then from xcode <span style="color: #808000;">(click on project root &#8212;&gt; Summary &#8212;&gt; Linked Frameworks And Libraries &#8212;&gt;(+) to add frameworks &#8212;-&gt; Add Other&#8230; &#8212;&gt; chose your opencv2.framework</span></p>
<p>2- and don&#8217;t forget adding important .framework dependencies from <span style="color: #808000;">Summary &#8212;&gt; Linked Frameworks And Libraries &#8212;&gt;(+) to add frameworks</span> and chose :</p>
<p><span style="color: #008000;">opencv2.framework  , Accelerate.framework , AssetsLibrary.framework , AVFoundation.framework ,CoreGraphics.framework , CoreImage.framework ,CoreMedia.framework, CoreVideo.framework ,QuartzCore.framework ,UIKit.framework ,Foundation.framework</span></p>
<p>3- if you face any &#8220;null std&#8221; error like this :</p><pre class="crayon-plain-tag">(null): &quot;cv::CascadeClassifier::load(std::string const&amp;amp;)&quot;, referenced from:
(null): &quot;std::__1::basic_string&amp;lt;char, std::__1::char_traits&amp;lt;char&amp;gt;, std::__1::allocator&amp;lt;char&amp;gt; &amp;gt;::compare(char const*) const&quot;, referenced from:
(null): &quot;std::__1::__vector_base_common&amp;lt;true&amp;gt;::__throw_length_error() const&quot;, referenced from:
(null): &quot;std::__1::locale::use_facet(std::__1::locale::id&amp;amp;) const&quot;, referenced from:
(null): &quot;std::__1::ios_base::getloc() const&quot;, referenced from:
(null): &quot;std::__1::basic_string&amp;lt;char, std::__1::char_traits&amp;lt;char&amp;gt;, std::__1::allocator&amp;lt;char&amp;gt; &amp;gt;::__init(char const*, unsigned long)&quot;, referenced from:
(null): &quot;std::__1::basic_string&amp;lt;char, std::__1::char_traits&amp;lt;char&amp;gt;, std::__1::allocator&amp;lt;char&amp;gt; &amp;gt;::__init(char const*, unsigned long, unsigned long)&quot;, referenced from:
(null): &quot;std::__1::basic_string&amp;lt;char, std::__1::char_traits&amp;lt;char&amp;gt;, std::__1::allocator&amp;lt;char&amp;gt; &amp;gt;::__init(unsigned long, char)&quot;, referenced from:
(null): &quot;std::__1::basic_string&amp;lt;char, std::__1::char_traits&amp;lt;char&amp;gt;, std::__1::allocator&amp;lt;char&amp;gt; &amp;gt;::append(char const*)&quot;, referenced from:</pre><p><span style="color: #ff6600;">the solution is</span> , -<span style="color: #808000;">Goto project &#8212;moveTo&#8211;&gt; Build Settings &#8212;slid down to&#8211;&gt; Apple LLVM compiler 4.2 &#8211; Language</span><br />
now change default  value of<br />
<span style="color: #808000;">&#8220;C++ Language Dialect&#8221; &#8212;to&#8211;&gt; &#8220;C++ 11 [-std=c++11]&#8220;</span><br />
<span style="color: #808000;">&#8220;C++ Standard Library&#8221; &#8212;to&#8211;&gt; &#8220;libc++(LLVM C++ standard library with C++ 11 support)&#8221;</span><br />
now reBuild the project , the error must disappear , enjoy <img src='http://www.exampledb.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Eng.Ahmed Al-Sadi</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exampledb.com/how-to-build-opencv-for-ios-easy-way.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>objective c fade animation UIImageView</title>
		<link>http://www.exampledb.com/objective-c-fade-animation-uiimageview.htm</link>
		<comments>http://www.exampledb.com/objective-c-fade-animation-uiimageview.htm#comments</comments>
		<pubDate>Wed, 26 Dec 2012 12:49:39 +0000</pubDate>
		<dc:creator>Eng.Ahmed AlSadi</dc:creator>
				<category><![CDATA[Objective C]]></category>
		<category><![CDATA[XCode]]></category>
		<category><![CDATA[objective c animation]]></category>
		<category><![CDATA[objective c fade]]></category>

		<guid isPermaLink="false">http://www.exampledb.com/?p=469</guid>
		<description><![CDATA[xcode &#8211; iOS &#8211; objective-c Hi; How to make fade in or fade out animation for &#8220;or on&#8221; UIImageView object in Objective-c &#8221; iOS&#8221; you want to use UIVew class and UIImageView object &#8220;myImage&#8221; 1-    UIView : beginAnimations : context // to tell that the animation options will start !! 2- UIView setAnimationCurve // to [...]]]></description>
				<content:encoded><![CDATA[<p>xcode &#8211; iOS &#8211; objective-c</p>
<p>Hi;</p>
<p>How to make fade in or fade out animation for &#8220;or on&#8221; UIImageView object in Objective-c &#8221; iOS&#8221;</p>
<p>you want to use UIVew class and UIImageView object &#8220;myImage&#8221;</p>
<p>1-    UIView : beginAnimations : context // to tell that the animation options will start !!</p>
<p>2- UIView setAnimationCurve // to set animation curve &#8220;fast then slow then fast etc..&#8221;</p>
<p>3- UIView setAnimationDuration // to set the time that the full animation will take &#8221; from start to end&#8221;</p>
<p>4- UIView commitAnimations // start animating <img src='http://www.exampledb.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&nbsp;</p><pre class="crayon-plain-tag">//Fade Out
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
    [UIView setAnimationDuration:1];
    [[self myImage]setAlpha:0];
    [UIView commitAnimations];

    //Fade in
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
    [UIView setAnimationDuration:1];
    [[self myImage]setAlpha:1];
    [UIView commitAnimations];</pre><p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.exampledb.com/objective-c-fade-animation-uiimageview.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>objective c UITableView change row cell height</title>
		<link>http://www.exampledb.com/objective-c-uitableview-change-row-cell-height.htm</link>
		<comments>http://www.exampledb.com/objective-c-uitableview-change-row-cell-height.htm#comments</comments>
		<pubDate>Sat, 13 Oct 2012 18:05:18 +0000</pubDate>
		<dc:creator>Eng.Ahmed AlSadi</dc:creator>
				<category><![CDATA[Objective C]]></category>
		<category><![CDATA[XCode]]></category>
		<category><![CDATA[change row height]]></category>
		<category><![CDATA[objective c]]></category>
		<category><![CDATA[table view]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.exampledb.com/?p=463</guid>
		<description><![CDATA[xcode &#8211; iphone &#8211; objective-c Hi; the code below shows how to change UITableView &#8221; table view &#8221; cell or row height by using [ UITableView : heightForRowAtIndexPath ] &#8221; Asks the delegate for the height to use for a row in a specified location &#8220; [crayon-519aa8f3b97b6/] &#160; or you can change cell &#8220;row&#8221; height [...]]]></description>
				<content:encoded><![CDATA[<p>xcode &#8211; iphone &#8211; objective-c<br />
Hi;</p>
<p>the code below shows how to change UITableView &#8221; table view &#8221; cell or row height by using [ UITableView : heightForRowAtIndexPath ] &#8221; Asks the delegate for the height to use for a row in a specified location &#8220;<span id="more-463"></span></p><pre class="crayon-plain-tag">//ExampleDB.com        by AlSadi
//heightForRowAtIndexPath
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 50;
}</pre><p>&nbsp;</p>
<p>or you can change cell &#8220;row&#8221; height by section number , or specific row</p><pre class="crayon-plain-tag">//ExampleDB.com       by AlSadi
//heightForRowAtIndexPath
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    switch (indexPath.section) {
        case 0:
        switch(indexPath.row){
        case 0:    return 40;break;
        default: return 35:break;
       }

            break;
        case 1:
            return 50;
            break;
        default:
            return 45;
            break;
    }
}</pre><p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exampledb.com/objective-c-uitableview-change-row-cell-height.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>objective c UITableView edit table view rows</title>
		<link>http://www.exampledb.com/objective-c-uitableview-edit-table-view-rows.htm</link>
		<comments>http://www.exampledb.com/objective-c-uitableview-edit-table-view-rows.htm#comments</comments>
		<pubDate>Sat, 13 Oct 2012 17:59:25 +0000</pubDate>
		<dc:creator>Eng.Ahmed AlSadi</dc:creator>
				<category><![CDATA[Objective C]]></category>
		<category><![CDATA[XCode]]></category>
		<category><![CDATA[edit table view]]></category>
		<category><![CDATA[objective c]]></category>
		<category><![CDATA[table view]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.exampledb.com/?p=461</guid>
		<description><![CDATA[xcode &#8211; iphone -objective-c Hi; to edit &#8221; delete or select &#8221; rows or cells of table view , you can use [ UITableView : setEditing ] &#8220;A Boolean value that determines whether the receiver is in editing mode&#8221; [crayon-519aa8f3bb6f7/] &#160;]]></description>
				<content:encoded><![CDATA[<p>xcode &#8211; iphone -objective-c<br />
Hi;</p>
<p>to edit &#8221; delete or select &#8221; rows or cells of table view , you can use [ UITableView : setEditing ] &#8220;A Boolean value that determines whether the receiver is in editing mode&#8221;<span id="more-461"></span></p><pre class="crayon-plain-tag">//ExampleDB.com     by AlSadi

[TableView setEditing:YES];</pre><p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exampledb.com/objective-c-uitableview-edit-table-view-rows.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>objective c UITableView delete selected rows</title>
		<link>http://www.exampledb.com/objective-c-uitableview-delete-selected-rows.htm</link>
		<comments>http://www.exampledb.com/objective-c-uitableview-delete-selected-rows.htm#comments</comments>
		<pubDate>Sat, 13 Oct 2012 17:56:38 +0000</pubDate>
		<dc:creator>Eng.Ahmed AlSadi</dc:creator>
				<category><![CDATA[Objective C]]></category>
		<category><![CDATA[XCode]]></category>
		<category><![CDATA[delete selected rows]]></category>
		<category><![CDATA[objective c]]></category>
		<category><![CDATA[table view]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.exampledb.com/?p=458</guid>
		<description><![CDATA[xcode &#8211; iphone &#8211; 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 : firstly , my preferred way is use [[ UITableView : indexPathsForSelectedRows ]count] to get the count of selected rows [...]]]></description>
				<content:encoded><![CDATA[<p>xcode &#8211; iphone &#8211; objective-c<br />
Hi;</p>
<p>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 :<br />
<span id="more-458"></span><br />
firstly , my preferred way is use [[ UITableView : indexPathsForSelectedRows ]count] to get the count of selected rows only , and [ UITableView : indexPathForSelectedRow ] to get first selected row &#8221; to delete &#8221; , so if you have an array of values to list on tableView , you can do like below :</p><pre class="crayon-plain-tag">//ExampleDB.com by AlSadi

    int selectedCoun = [[tableView indexPathsForSelectedRows]count];       
    for (int i=0; i&amp;lt;selectedCoun; i++) {
        NSIndexPath* tmpIndexPath = [tableView indexPathForSelectedRow];
        [self tableView:tableView commitEditingStyle:UITableViewCellEditingStyleDelete forRowAtIndexPath:tmpIndexPath];
    }</pre><p>&nbsp;</p>
<p>and on [ tableView : commitEditingStyle : forRowAtIndexPath ] from UITableViewDataSource Protocol Reference under UITableViewCellEditingStyleDelete editing style do as below :</p><pre class="crayon-plain-tag">//ExampleDB.com   by AlSadi

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (editingStyle == UITableViewCellEditingStyleDelete) {
        [myArray removeObjectAtIndex:indexPath.row];
        [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
    }   
    else if (editingStyle == UITableViewCellEditingStyleInsert) {

    }   
}</pre><p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exampledb.com/objective-c-uitableview-delete-selected-rows.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>objective c iphone delete file</title>
		<link>http://www.exampledb.com/objective-c-iphone-delete-file.htm</link>
		<comments>http://www.exampledb.com/objective-c-iphone-delete-file.htm#comments</comments>
		<pubDate>Tue, 09 Oct 2012 19:53:42 +0000</pubDate>
		<dc:creator>Eng.Ahmed AlSadi</dc:creator>
				<category><![CDATA[Objective C]]></category>
		<category><![CDATA[XCode]]></category>
		<category><![CDATA[delete file]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[NSFileManager]]></category>
		<category><![CDATA[objective c]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.exampledb.com/?p=455</guid>
		<description><![CDATA[xcode &#8211; iphone &#8211; objective c Hi; the method &#8220;function&#8221; below is an example how to delete file using file manager &#8220;NSFileManager&#8221; [ NSFileManager : removeItemAtPath: error ] &#8220;Removes the file or directory at the specified path.&#8221; , you can use this method &#8220;function&#8221; to do this. [crayon-519aa8f3c348b/] &#160;]]></description>
				<content:encoded><![CDATA[<p>xcode &#8211; iphone &#8211; objective c</p>
<p>Hi;<br />
the method &#8220;function&#8221; below is an example how to delete file using file manager &#8220;NSFileManager&#8221; [ NSFileManager : removeItemAtPath: error ] &#8220;Removes the file or directory at the specified path.&#8221; , you can use this method &#8220;function&#8221; to do this.<br />
<span id="more-455"></span></p><pre class="crayon-plain-tag">//exampledb.com
//DeleteFile // By AlSadi
-(void)DeleteFile:(NSString*)filePath
{
    NSFileManager* fileMngr = [NSFileManager defaultManager];
    if ([fileMngr fileExistsAtPath:filePath]) {
        NSError* deletionError;
        bool isDeleted = [fileMngr removeItemAtPath:filePath error:&amp;amp;deletionError];
        if (isDeleted) {
            NSLog(@&quot;file Deleted&quot;);
        }else {
            NSLog(@&quot;Deleting Error : %@&quot;,[deletionError localizedDescription]);
        }
        deletionError = nil;
    }
    fileMngr = nil;
}</pre><p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exampledb.com/objective-c-iphone-delete-file.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>objective c UITableView delete all rows table view</title>
		<link>http://www.exampledb.com/objective-c-uitableview-delete-all-rows-table-view.htm</link>
		<comments>http://www.exampledb.com/objective-c-uitableview-delete-all-rows-table-view.htm#comments</comments>
		<pubDate>Tue, 09 Oct 2012 19:49:10 +0000</pubDate>
		<dc:creator>Eng.Ahmed AlSadi</dc:creator>
				<category><![CDATA[Objective C]]></category>
		<category><![CDATA[XCode]]></category>
		<category><![CDATA[delete all rows]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective c]]></category>
		<category><![CDATA[table view]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.exampledb.com/?p=453</guid>
		<description><![CDATA[xcode &#8211; iphone &#8211; 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] &#8220;Reloads the rows and sections of the receiver&#8221; [crayon-519aa8f3c3fb2/] &#160;]]></description>
				<content:encoded><![CDATA[<p>xcode &#8211; iphone &#8211; objective c<br />
Hi;</p>
<p>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] &#8220;Reloads the rows and sections of the receiver&#8221;<br />
<span id="more-453"></span></p><pre class="crayon-plain-tag">//exampledb.com  - By AlSadi
//Remove all tableview rows or cells
-(void) DeleteAllList
{
    [arrayList removeAllObjects];
    [TableView reloadData];
}</pre><p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exampledb.com/objective-c-uitableview-delete-all-rows-table-view.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Objective c parse file name from path</title>
		<link>http://www.exampledb.com/objective-c-parse-file-name-from-path.htm</link>
		<comments>http://www.exampledb.com/objective-c-parse-file-name-from-path.htm#comments</comments>
		<pubDate>Sun, 07 Oct 2012 14:49:19 +0000</pubDate>
		<dc:creator>Eng.Ahmed AlSadi</dc:creator>
				<category><![CDATA[Objective C]]></category>
		<category><![CDATA[XCode]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[objective c]]></category>
		<category><![CDATA[parse file name]]></category>
		<category><![CDATA[parse path]]></category>
		<category><![CDATA[Xcode]]></category>

		<guid isPermaLink="false">http://www.exampledb.com/?p=450</guid>
		<description><![CDATA[xcode &#8211; iphone &#8211; objective c Hi; the line code below show how to get or parse file name from full path using [NSString : lastPathComponent] [crayon-519aa8f3c4a21/] &#160;]]></description>
				<content:encoded><![CDATA[<p>xcode &#8211; iphone &#8211; objective c<br />
Hi;</p>
<p>the line code below show how to get or parse file name from full path using [NSString : lastPathComponent]<br />
<span id="more-450"></span></p><pre class="crayon-plain-tag">//get filename from path - alsadi
NSString* fileName = [fullFilePath lastPathComponent];</pre><p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.exampledb.com/objective-c-parse-file-name-from-path.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- Dynamic Page Served (once) in 1.111 seconds -->
<!-- Cached page served by WP-Cache -->
