2017年9月15日 星期五

Class has no initializers in swift

Class has no initializers in swift

I have met this situation.

Found a solution here

It says if you have the code like bellow

var searchController: UISearchController
 
 
You need to change to 
 
var searchController: UISearchController!
or
 
use optional to avoid it crash.
 
var searchController: UISearchController?
 
   

2017年9月12日 星期二

Undefined symbols for architecture arm64: "_VTDecompressionSessionCreate", referenced from:


If you integrate MobileVLCKit to your app, and found you have this hints..

Undefined symbols for architecture arm64:
"_VTDecompressionSessionCreate", referenced from:

Like bellow....




Then, you should add VideoToolbox.framework, libz.tbd, libbz2.tbd, libiconv.tbd, CoreMedia.framework to your "linked frameworks and libraries".

2017年7月12日 星期三

[iOS] "Images can’t contain alpha channels or transparencies.":

"Images can’t contain alpha channels or transparencies.":

or

The icon becomes black background.

We can use the preview program in mac to export to jpeg so that it the alpha channel can be removed.

2017年4月27日 星期四

[iOS] How to read byte in NSData?

如何從NSData讀Byte? 
 
NSData * theData = [NSData dataWithContentsOfFile: path];
const char* theBytes = (const char*)[theData bytes];
 
那讀幾個Byte?
 
NSRange range = NSMakeRange(location, length);
NSData *someData = [theData subdataWithRange:range]; 
const char* theBytes = (const char*)[someData bytes];

2017年4月25日 星期二

[iOS] The color of the back barbutton in Navigationbar.

Try to set this.

self.navigationController.navigationBar.tintColor

not

self.navigationItem.backBarButtonItem.tintColor

2017年4月12日 星期三

[iOS] x duplicate symbols for architecture xxxxxx

x duplicate symbols for architecture xxxxxx

之前有遇到過,有解過,但是忘記

現在記錄下來

是因為import的.h打成.m 所以才會這樣。

2016年3月22日 星期二

Google map sdk 的GMSMarker如何在一開始show的時候就顯示title及info?



使用[GoogleMapView setSelectedMarker:YourMarker];

即可

Class has no initializers in swift

Class has no initializers in swift I have met this situation. Found a solution here It says if you have the code like bellow var se...