<div dir="ltr">It's a change in Xcode 8.2 - NSThread.isMainThread in ObjC land is now a class property:<div><br></div><div><div>@property (class, readonly) BOOL isMainThread NS_AVAILABLE(10_5, 2_0);<br></div><div><br></div><div>In Xcode 8.1(and since iPhone OS 2) it was a regular old-school class method:</div><div><br></div><div><div>+ (BOOL)isMainThread NS_AVAILABLE(10_5, 2_0)</div></div><div><br></div><div>and so it loses the paren requirement now.</div><div><br></div><div>++md<br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 13, 2016 at 10:13 AM, Nate Birkholz via swift-users <span dir="ltr"><<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Is this a change to NSThread in the release, or to the language, dropping empty () when calling methods? If the latter, what proposal is it? i can't find it.</div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Wed, Jul 13, 2016 at 12:41 AM, Jose Cheyo Jimenez via swift-users <span dir="ltr"><<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>//swift 2.2+</div><div>NSThread.isMainThread()</div><div><br></div><div>//swift 3+</div><div>Thread.isMainThread</div><div><br></div><br><div><blockquote type="cite"><div>On Jul 13, 2016, at 12:27 AM, qi bo via swift-users <<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>> wrote:</div><br><div>
<div><p dir="auto">isMainThread is an method in object-c. how to indicate current thread is main thread?</p><p dir="auto">thank you<br>
Bob</p>
</div>
_______________________________________________<br>swift-users mailing list<br><a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-users" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br></div></blockquote></div><br></div><br>_______________________________________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div data-smartmail="gmail_signature">Nate Birkholz</div>
</font></span></div>
<br>_______________________________________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br>
<br></blockquote></div><br></div>