# 有無swift版本的範例程式碼可以參考？

**URL:** <https://bbs.aprbrother.com/t/swift/462>\
**Category:** AprilBeacon\
**Created:** [January 29, 2016, 7:52am UTC](https://bbs.aprbrother.com/t/swift/462 "2016-01-29T07:52:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kql47257](https://bbs.aprbrother.com/letter_avatar_proxy/v4/letter/k/9de053/32.png) [@kql47257](https://bbs.aprbrother.com/u/kql47257)\
**Post date:** [January 29, 2016, 7:52am UTC](https://bbs.aprbrother.com/t/swift/462/1 "2016-01-29T07:52:30Z")

</div>

您好：  
我最近才接觸iOS的開發，  
GitHub上的範例都是用Objective-C寫的，  
想請問有無swift版本的範例程式碼可以參考？  
謝謝

---

<div class="post-metadata">

**Author:** ![aprilpea](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/aprilpea/32/9_2.png) [@aprilpea](https://bbs.aprbrother.com/u/aprilpea)\
**Post date:** [January 29, 2016, 7:57am UTC](https://bbs.aprbrother.com/t/swift/462/2 "2016-01-29T07:57:47Z")

</div>

暂时没有swfit的范例

---

<div class="post-metadata">

**Author:** ![kql47257](https://bbs.aprbrother.com/letter_avatar_proxy/v4/letter/k/9de053/32.png) [@kql47257](https://bbs.aprbrother.com/u/kql47257)\
**Post date:** [January 29, 2016, 8:04am UTC](https://bbs.aprbrother.com/t/swift/462/3 "2016-01-29T08:04:49Z")

</div>

我想要做出偵測附近有beacon就會跳出訊息的ＡＰＰ，  
那請問我需要參考哪一個Objective-C的檔案去修改呢？  
可以給點方向嗎？  
謝謝

---

<div class="post-metadata">

**Author:** ![Rose](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/rose/32/12_2.png) [@Rose](https://bbs.aprbrother.com/u/Rose)\
**Post date:** [January 29, 2016, 8:24am UTC](https://bbs.aprbrother.com/t/swift/462/4 "2016-01-29T08:24:44Z")

</div>

你可以参考苹果的官方文档。如何在swift中使用Objective-C的代码。苹果都有说明的

---

<div class="post-metadata">

**Author:** ![kql47257](https://bbs.aprbrother.com/letter_avatar_proxy/v4/letter/k/9de053/32.png) [@kql47257](https://bbs.aprbrother.com/u/kql47257)\
**Post date:** [January 29, 2016, 8:38am UTC](https://bbs.aprbrother.com/t/swift/462/5 "2016-01-29T08:38:05Z")

</div>

謝謝，我知道怎麼從swift中使用Objective-C的function，  
但因為不太清楚Objective-C要怎麼寫，  
所以也不知道要看哪部分的demo code來參考改寫。  
因此想請問有沒有比較明確可以看哪一部分的code，  
例如需要import哪個檔案，要實作哪個function等  
謝謝回覆

---

<div class="post-metadata">

**Author:** ![Rose](https://bbs.aprbrother.com/user_avatar/bbs.aprbrother.com/rose/32/12_2.png) [@Rose](https://bbs.aprbrother.com/u/Rose)\
**Post date:** [February 1, 2016, 6:23am UTC](https://bbs.aprbrother.com/t/swift/462/6 "2016-02-01T06:23:02Z")

</div>

可以查看ABBeaconViewController和ABBluetoothViewController这两个类中如何使用我们的SDK
