<?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>Programming Tutorials</title>
	<atom:link href="https://apptyrant.com/category/tutorials/programming-tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>https://apptyrant.com</link>
	<description>Great apps for macOS and iOS</description>
	<lastBuildDate>Tue, 10 Jun 2025 17:07:25 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>

<image>
	<url>https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2018/04/cropped-1024AppTyrantIconOnTanBG3.png?fit=32%2C32&#038;ssl=1</url>
	<title>Programming Tutorials</title>
	<link>https://apptyrant.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">103265284</site>	<item>
		<title>How to Convert Decimal to Hexadecimal</title>
		<link>https://apptyrant.com/2023/04/19/convertdecimaltohexadecimal/</link>
		
		<dc:creator><![CDATA[App Tyrant Corp]]></dc:creator>
		<pubDate>Wed, 19 Apr 2023 00:49:27 +0000</pubDate>
				<category><![CDATA[Programming Tutorials]]></category>
		<guid isPermaLink="false">https://apptyrant.com/?p=15516</guid>

					<description><![CDATA[<p>Decimal and hexadecimal are two number systems that are widely used in the fields of computer science and mathematics. Decimal is a base-10 number system that uses the digits 0-9, while hexadecimal is a base-16 number system that uses the digits 0-9 and the letters A-F. In this tutorial, we will show you how to ... <a title="How to Convert Decimal to Hexadecimal" class="read-more" href="https://apptyrant.com/2023/04/19/convertdecimaltohexadecimal/" aria-label="Read more about How to Convert Decimal to Hexadecimal">Read more</a></p>
The post <a href="https://apptyrant.com/2023/04/19/convertdecimaltohexadecimal/">How to Convert Decimal to Hexadecimal</a> first appeared on <a href="https://apptyrant.com">App Tyrant</a>.]]></description>
										<content:encoded><![CDATA[<p>Decimal and hexadecimal are two number systems that are widely used in the fields of computer science and mathematics. Decimal is a base-10 number system that uses the digits 0-9, while hexadecimal is a base-16 number system that uses the digits 0-9 and the letters A-F. In this tutorial, we will show you how to convert decimal to hexadecimal.</p>

<h3 style="margin-bottom:0px;">
Step 1: Divide the Decimal Number by 16
</h3>
<br>
<p>
The first step in converting a decimal number to a hexadecimal number is to divide the decimal number by 16. Write down the quotient and remainder of the division.
</p><p>
For example, let&#8217;s convert the decimal number 4096 to hexadecimal.
</p>
<p>
4096 ÷ 16 = 256 <br>
Quotient = 256 <br>
Remainder = 0
</p>

<h3 style="margin-bottom:0px;">
Step 2: Convert the Remainder to Hexadecimal
</h3>
<br>
<p>
The next step is to convert the remainder from the previous step to hexadecimal. To do this, you can use the following conversion chart:
</p>
<table>
  <thead>
    <tr>
      <th>Decimal</th>
      <th>Hexadecimal</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>0</td>
      <td>0</td>
    </tr>
    <tr>
      <td>1</td>
      <td>1</td>
    </tr>
    <tr>
      <td>2</td>
      <td>2</td>
    </tr>
    <tr>
      <td>3</td>
      <td>3</td>
    </tr>
    <tr>
      <td>4</td>
      <td>4</td>
    </tr>
    <tr>
      <td>5</td>
      <td>5</td>
    </tr>
    <tr>
      <td>6</td>
      <td>6</td>
    </tr>
    <tr>
      <td>7</td>
      <td>7</td>
    </tr>
    <tr>
      <td>8</td>
      <td>8</td>
    </tr>
    <tr>
      <td>9</td>
      <td>9</td>
    </tr>
    <tr>
      <td>10</td>
      <td>A</td>
    </tr>
    <tr>
      <td>11</td>
      <td>B</td>
    </tr>
    <tr>
      <td>12</td>
      <td>C</td>
    </tr>
    <tr>
      <td>13</td>
      <td>D</td>
    </tr>
    <tr>
      <td>14</td>
      <td>E</td>
    </tr>
    <tr>
      <td>15</td>
      <td>F</td>
    </tr>
  </tbody>
</table>


<p>
In our example, the remainder is 0, so the hexadecimal equivalent is also 0.
</p>
<h3 style="margin-bottom:0px;">
Step 3: Repeat the Process Until the Quotient is 0
</h3>
<br>
<p>
The next step is to repeat the previous two steps until the quotient is 0. In our example, we have:
</p>
<p>
256 ÷ 16 = 16 <br>
Quotient = 16 <br>
Remainder = 0
</p>
<p>
16 ÷ 16 = 1 <br>
Quotient = 1 <br>
Remainder = 0
</p>
<p>
1 ÷ 16 = 0 <br>
Quotient = 0 <br>
Remainder = 1
</p>
<h3 style="margin-bottom:0px;">
Step 4: Write the Hexadecimal Equivalent
</h3>
<br>
<p>
Once the quotient is 0, you can write down the hexadecimal equivalent by writing the remainders from the last step in reverse order. In our example, the remainders are 0, 0, 0, and 1, so the hexadecimal equivalent of 4096 is 1000.
</p>
<p>
Therefore, the decimal number 4096 is equivalent to the hexadecimal number 1000.
</p>
<h3 style="margin-bottom:0px;">
Final Thoughts
</h3>
<br>
<p>
Converting decimal to hexadecimal may seem complicated at first, but it&#8217;s actually quite simple once you understand the process. Just remember to divide the decimal number by 16, convert the remainder to hexadecimal, and repeat the process until the quotient is 0. By following these steps, you can easily convert decimal to hexadecimal for any number.
</p>
<h3 style="margin-bottom:0px;">
Want to convert Decimal to Hexadecimal Even Faster?
</h3>
<br>
<p>
<strong><a href="https://apps.apple.com/us/app/hex-converter/id1449725744?mt=12" target="_blank" rel="noopener">Hex Converter</strong> is an application for macOS that can instantly convert decimal numbers to hexadecimal (and vice versa); get Hex Converter on the Mac App Store at a very low price here!</a>
</p>The post <a href="https://apptyrant.com/2023/04/19/convertdecimaltohexadecimal/">How to Convert Decimal to Hexadecimal</a> first appeared on <a href="https://apptyrant.com">App Tyrant</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">15516</post-id>	</item>
		<item>
		<title>Easily Bind an NSProgress Object to an NSProgressIndicator in Objective-C [Open Source]</title>
		<link>https://apptyrant.com/2020/02/12/easily-bind-an-nsprogress-object-to-an-nsprogressindicator-in-objective-c-open-source/</link>
		
		<dc:creator><![CDATA[App Tyrant Corp]]></dc:creator>
		<pubDate>Wed, 12 Feb 2020 19:19:16 +0000</pubDate>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming Tutorials]]></category>
		<category><![CDATA[AppKit]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[NSProgress]]></category>
		<category><![CDATA[NSProgressIndicator]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[UIProgressView]]></category>
		<guid isPermaLink="false">https://apptyrant.com/?p=7648</guid>

					<description><![CDATA[<p>In UIKit UIProgressView has an observedProgress property. If you set the observedProgress property on a UIProgressView, it will automatically update its appearance when you make changes to the NSProgress object. On macOS (in AppKit at least) NSProgressIndicator does not have an equivalent API. I created a simple category on NSProgressIndicator that adds an observedProgress property ... <a title="Easily Bind an NSProgress Object to an NSProgressIndicator in Objective-C [Open Source]" class="read-more" href="https://apptyrant.com/2020/02/12/easily-bind-an-nsprogress-object-to-an-nsprogressindicator-in-objective-c-open-source/" aria-label="Read more about Easily Bind an NSProgress Object to an NSProgressIndicator in Objective-C [Open Source]">Read more</a></p>
The post <a href="https://apptyrant.com/2020/02/12/easily-bind-an-nsprogress-object-to-an-nsprogressindicator-in-objective-c-open-source/">Easily Bind an NSProgress Object to an NSProgressIndicator in Objective-C [Open Source]</a> first appeared on <a href="https://apptyrant.com">App Tyrant</a>.]]></description>
										<content:encoded><![CDATA[<p>
In UIKit UIProgressView has an <a href="https://developer.apple.com/documentation/uikit/uiprogressview/1619840-observedprogress?language=objc" target="_blank">observedProgress property</a>. If you set the observedProgress property on a UIProgressView, it will automatically update its appearance when you make changes to the NSProgress object. On macOS (in AppKit at least) NSProgressIndicator does not have an equivalent API. I created a simple category on NSProgressIndicator that adds an observedProgress property on NSProgressIndicator. The source code is available on <a href="https://github.com/AppTyrant/NSProgressIndicator-ProgressBinding" target="_blank">Github here.</a>
</p>The post <a href="https://apptyrant.com/2020/02/12/easily-bind-an-nsprogress-object-to-an-nsprogressindicator-in-objective-c-open-source/">Easily Bind an NSProgress Object to an NSProgressIndicator in Objective-C [Open Source]</a> first appeared on <a href="https://apptyrant.com">App Tyrant</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">7648</post-id>	</item>
		<item>
		<title>Adding Force Touch Features to macOS Apps with a Custom Gesture Recognizer [Open Source]</title>
		<link>https://apptyrant.com/2018/09/10/adding-force-touch-features-to-macos-apps-with-a-custom-gesture-recognizer-open-source/</link>
		
		<dc:creator><![CDATA[App Tyrant Corp]]></dc:creator>
		<pubDate>Mon, 10 Sep 2018 15:15:29 +0000</pubDate>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming Tutorials]]></category>
		<category><![CDATA[3D Touch]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Force Touch]]></category>
		<category><![CDATA[NSGestureRecognizer]]></category>
		<category><![CDATA[Objective-C]]></category>
		<guid isPermaLink="false">https://apptyrant.com/?p=4584</guid>

					<description><![CDATA[<p>I created a simple subclass of NSGestureRecognizer, ATForceTouchGesture, to simplify the process of adding Force Touch features to macOS apps. You can use this gesture recognizer to add a feature like force clicking to start editing a label (see the screenshot below). There is a sample project available on Github here.</p>
The post <a href="https://apptyrant.com/2018/09/10/adding-force-touch-features-to-macos-apps-with-a-custom-gesture-recognizer-open-source/">Adding Force Touch Features to macOS Apps with a Custom Gesture Recognizer [Open Source]</a> first appeared on <a href="https://apptyrant.com">App Tyrant</a>.]]></description>
										<content:encoded><![CDATA[<p>I created a simple subclass of NSGestureRecognizer, ATForceTouchGesture, to simplify the process of adding Force Touch features to macOS apps. You can use this gesture recognizer to add a feature like force clicking to start editing a label (see the screenshot below). </p>

<p>
<img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/github.com/AppTyrant/ATForceTouchGesture/raw/master/ATForceTouchGestureSample/ForceClickToEditGIF.gif?w=1087&#038;ssl=1" alt="Image captures 'force click' to edit using ATForceTouchGesture.">
</p>

<p>
There is a sample project available on <a href="https://github.com/AppTyrant/ATForceTouchGesture" target="_blank"> Github here.</a>
</p>The post <a href="https://apptyrant.com/2018/09/10/adding-force-touch-features-to-macos-apps-with-a-custom-gesture-recognizer-open-source/">Adding Force Touch Features to macOS Apps with a Custom Gesture Recognizer [Open Source]</a> first appeared on <a href="https://apptyrant.com">App Tyrant</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">4584</post-id>	</item>
		<item>
		<title>Exporting NSTableView to HTML [Open Source]</title>
		<link>https://apptyrant.com/2017/01/08/exporting-nstableview-to-html-open-source/</link>
		
		<dc:creator><![CDATA[App Tyrant Corp]]></dc:creator>
		<pubDate>Sun, 08 Jan 2017 20:13:22 +0000</pubDate>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming Tutorials]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[NSTableView]]></category>
		<category><![CDATA[Objective-C]]></category>
		<guid isPermaLink="false">https://apptyrant.com/?p=3786</guid>

					<description><![CDATA[<p>I needed to export the contents of a NSTableView to HTML, so I wrote a little NSTableView subclass in Objective-C to do this. ATHyperTextTableView is a simple NSTableView subclass that makes exporting a table view to HTML easy. You can customize the look of the exported HTML table with your own CSS too. Screenshots Below: ... <a title="Exporting NSTableView to HTML [Open Source]" class="read-more" href="https://apptyrant.com/2017/01/08/exporting-nstableview-to-html-open-source/" aria-label="Read more about Exporting NSTableView to HTML [Open Source]">Read more</a></p>
The post <a href="https://apptyrant.com/2017/01/08/exporting-nstableview-to-html-open-source/">Exporting NSTableView to HTML [Open Source]</a> first appeared on <a href="https://apptyrant.com">App Tyrant</a>.]]></description>
										<content:encoded><![CDATA[<p>
I needed to export the contents of a NSTableView to HTML, so I wrote a little NSTableView subclass in Objective-C to do this.
</p>

<p>ATHyperTextTableView is a simple NSTableView subclass that makes exporting a table view to HTML easy. You can customize the look of the exported HTML table with your own CSS too.</p>

<strong>Screenshots Below:</strong>
<br/>
<img data-recalc-dims="1" fetchpriority="high" decoding="async" src="https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/NSTableViewScreenshot.png?resize=1026%2C635&#038;ssl=1" alt="Screenshot of NSTableView." width="1026" height="635" class="alignnone size-full wp-image-3787" srcset="https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/NSTableViewScreenshot.png?w=1026&amp;ssl=1 1026w, https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/NSTableViewScreenshot.png?resize=300%2C186&amp;ssl=1 300w, https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/NSTableViewScreenshot.png?resize=768%2C475&amp;ssl=1 768w, https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/NSTableViewScreenshot.png?resize=1024%2C634&amp;ssl=1 1024w, https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/NSTableViewScreenshot.png?resize=30%2C19&amp;ssl=1 30w" sizes="(max-width: 1026px) 100vw, 1026px" /><br/>
<figure id="attachment_3788" aria-describedby="caption-attachment-3788" style="width: 1016px" class="wp-caption alignnone"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/ATHyperTextTableViewWebviewScreenshot.png?resize=1026%2C635&#038;ssl=1" alt="Screenshot of exported HTML from a the tableView, loaded into a WebView." width="1026" height="635" class="size-full wp-image-3788" srcset="https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/ATHyperTextTableViewWebviewScreenshot.png?w=1026&amp;ssl=1 1026w, https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/ATHyperTextTableViewWebviewScreenshot.png?resize=300%2C186&amp;ssl=1 300w, https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/ATHyperTextTableViewWebviewScreenshot.png?resize=768%2C475&amp;ssl=1 768w, https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/ATHyperTextTableViewWebviewScreenshot.png?resize=1024%2C634&amp;ssl=1 1024w, https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/ATHyperTextTableViewWebviewScreenshot.png?resize=30%2C19&amp;ssl=1 30w" sizes="(max-width: 1026px) 100vw, 1026px" /><figcaption id="caption-attachment-3788" class="wp-caption-text">Screenshot of the exported HTML loaded into a WebView.</figcaption></figure>
<br/>
<figure id="attachment_3789" aria-describedby="caption-attachment-3789" style="width: 902px" class="wp-caption alignnone"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/ATHyperTextTableViewWebviewScreenshotCustomCSS.png?resize=912%2C648&#038;ssl=1" alt="Screenshot of exported HTML from a the tableView, loaded into a WebView with custom CSS set." width="912" height="648" class="size-full wp-image-3789" srcset="https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/ATHyperTextTableViewWebviewScreenshotCustomCSS.png?w=912&amp;ssl=1 912w, https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/ATHyperTextTableViewWebviewScreenshotCustomCSS.png?resize=300%2C213&amp;ssl=1 300w, https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/ATHyperTextTableViewWebviewScreenshotCustomCSS.png?resize=768%2C546&amp;ssl=1 768w, https://i0.wp.com/apptyrant.com/wordpress/wp-content/uploads/2017/01/ATHyperTextTableViewWebviewScreenshotCustomCSS.png?resize=30%2C21&amp;ssl=1 30w" sizes="(max-width: 912px) 100vw, 912px" /><figcaption id="caption-attachment-3789" class="wp-caption-text">Screenshot of the exported HTML loaded into a WebView, styled with custom CSS.</figcaption></figure>


<p>There is a sample project available on <a href="https://github.com/AppTyrant/ATHyperTextTableView" target="_blank">Github here</a>.</p>The post <a href="https://apptyrant.com/2017/01/08/exporting-nstableview-to-html-open-source/">Exporting NSTableView to HTML [Open Source]</a> first appeared on <a href="https://apptyrant.com">App Tyrant</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3786</post-id>	</item>
		<item>
		<title>How to Disable NSScrollView Scrolling</title>
		<link>https://apptyrant.com/2015/05/18/how-to-disable-nsscrollview-scrolling/</link>
		
		<dc:creator><![CDATA[App Tyrant Corp]]></dc:creator>
		<pubDate>Mon, 18 May 2015 18:03:56 +0000</pubDate>
				<category><![CDATA[Developer Reference]]></category>
		<category><![CDATA[Programming Tutorials]]></category>
		<category><![CDATA[AppKit]]></category>
		<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[NSScrollView]]></category>
		<category><![CDATA[ObjC]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[UIScrollView]]></category>
		<guid isPermaLink="false">http://apptyrant.com/?p=1628</guid>

					<description><![CDATA[<p>Unlike UIScrollView on iOS, NSScrollView on Mac does not have a handy scrollEnabled property you can use to temporarily disable scrolling. If you Google around, you can find several posts on websites like stackoverflow that ask questions like How can I disable the vertical scrolling of a NSScrollView? Some have suggested setting the hasVerticalScroller property ... <a title="How to Disable NSScrollView Scrolling" class="read-more" href="https://apptyrant.com/2015/05/18/how-to-disable-nsscrollview-scrolling/" aria-label="Read more about How to Disable NSScrollView Scrolling">Read more</a></p>
The post <a href="https://apptyrant.com/2015/05/18/how-to-disable-nsscrollview-scrolling/">How to Disable NSScrollView Scrolling</a> first appeared on <a href="https://apptyrant.com">App Tyrant</a>.]]></description>
										<content:encoded><![CDATA[<p>Unlike UIScrollView on iOS, NSScrollView on Mac does not have a handy <a href="https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIScrollView_Class/#//apple_ref/occ/instp/UIScrollView/scrollEnabled" target="_blank">scrollEnabled</a> property you can use to temporarily disable scrolling.
</p>
<p>
If you Google around, you can find several posts on websites like stackoverflow that ask questions like <a href="http://stackoverflow.com/questions/9801197/how-can-i-disable-the-vertical-scrolling-of-a-nsscrollview" target="_blank">How can I disable the vertical scrolling of a NSScrollView?</a> Some have suggested setting the hasVerticalScroller property to NO as the answer. However, the hasVerticalScroller property only effects the visibility of the scroller, a value of NO does not actually prevent scrolling. </p>

<p>There are also ways to constrain scrolling from an NSView subclass, as described in Apple&#8217;s documentation <a href="https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/NSScrollViewGuide/Articles/Scrolling.html#//apple_ref/doc/uid/TP40003463-SW7">here</a>. Constraining scrolling from a view subclass can be useful, but what if you want to just temporarily disable scrolling? 
</p>

<p>
The easiest way to disable scrolling is to subclass NSScrollView and add a BOOL property with a name like scrollingEnabled. Then you can simply override the designated initializers (initWithFrame: and initWithCoder:) and set the ivar of the property to YES as the default value:
</p>

<pre lang="objc">
-(instancetype)initWithFrame:(NSRect)frameRect 
{ 
   self = [super initWithFrame:frameRect]; 
   if (self) 
   { 
       [self setUpOnInit]; 
   } 
   return self; 
}

- (instancetype)initWithCoder:(NSCoder *)coder 
{ 
    self = [super initWithCoder:coder]; 
    if (self) 
    { 
         [self setUpOnInit]; 
    } 
    return self; 
}

-(void)setUpOnInit
{
   // Set all default values. 
   _scrollingEnabled = YES; 
} 
</pre>

<p>
Now you can override the scrollWheel: method and check the property:
</p>

<pre lang="objc">
-(void)scrollWheel:(NSEvent *)theEvent 
{ 
    if (self.scrollingEnabled) {  
      [super scrollWheel:theEvent];  
     } 
    else {  
       // scrolling is disabled. 
    } 
}
</pre>

<p> This technique will work in most cases, but it isn&#8217;t enough to completely disable scrolling. If there is a view inside of a scroll view that implements autoscrolling behavior (if the view is a dragging destination) the scrollWheel: override won&#8217;t block scrolling during an attempted drag and drop operation. To disable scrolling in all cases, you should also subclass NSClipView and block scrolling by overriding the -constrainBoundsRect: method like this:
</p>

<pre lang="objc">
-(NSRect)constrainBoundsRect:(NSRect)proposedBounds
{
    MyScrollViewSubclass *mainScrollView = (MyScrollViewSubclass*)self.superview;
    
    if (mainScrollView.scrollingEnabled)
    {
        return [super constrainBoundsRect:proposedBounds];
    }
    else
    {
        // Disabled
        return self.documentVisibleRect;
    }
}
</pre>

<p>
After you do that, scrolling should be disabled whenever you set the scrollingEnabled property to NO. But there may be cases where the scroll bar remains visible even when you have scrolling disabled (depending on what type of mouse is being used). To deal with this you should also make sure you set the hasVerticalScroller property to NO when you disable scrolling. If desired, you can implement the setter of the scrollingEnabled property and set hasVerticalScroller at the same time.
</p>The post <a href="https://apptyrant.com/2015/05/18/how-to-disable-nsscrollview-scrolling/">How to Disable NSScrollView Scrolling</a> first appeared on <a href="https://apptyrant.com">App Tyrant</a>.]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1628</post-id>	</item>
	</channel>
</rss>
