In WWDC23 https://developer.apple.com/videos/play/wwdc2023/10226/, the new debugging was released.
import OSLog
let logger = Logger(subsystem: "You system", category: "Account")
func doSomething() {
logger.info("start")
In WWDC23 https://developer.apple.com/videos/play/wwdc2023/10226/, the new debugging was released.
import OSLog
let logger = Logger(subsystem: "You system", category: "Account")
func doSomething() {
logger.info("start")
DEVICE TYPE | PRODUCT NAME | RESOLUTION (PIXEL) | UIKIT SIZE (POINT) | ASPECT RATIO (H:W) | UIKIT SCALE | PIXEL PER INCH (PPI) |
---|---|---|---|---|---|---|
iPhone1,1 | iPhone | 320 x 480 | 320 x 480 | 1.5 | 1.0 | 163 |
iPhone1,2 | iPhone 3G | 320 x 480 | 320 x 480 | 1.5 | 1.0 | 163 |
iPhone2,1 | iPhone 3GS | 320 x 480 | 320 x 480 | 1.5 | 1.0 | 163 |
iPhone3,1 | iPhone 4 (GSM) | 320 x 480 | 640 x 960 | 1.5 | 2.0 | 326 |
iPhone3,3 | iPhone 4 (CDMA) | 320 x 480 | 640 x 960 | 1.5 | 2.0 | 326 |
iPhone4,1 | iPhone 4S | 320 x 480 | 640 x 960 | 2.0 | 1.5 | 326 |
This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.
I have been working with OpenGL ES related stuff in iOS. With Metal taking over iOS GPU rendering, it seems not too smart to start learning if you are very new, however, regardless OpenGL, Metal, they are both doing the similar stuff, which is GPU grapical rendering. If you knew one, you will easily know the other.
This is not a tutorial, it is more like a reference book for myself and u the reader.
#iOSBySheldon #objective-c #swift #unitTest #uiTest #sleep
This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.
The only reason that I wrote this short quick note is that, the answers on the internet is somewhat misleading.
If we are running sleep()
usleep()
or [NSThread sleepForTimeInterval:]
in your main app, there should not be any difference. Because the first two functions are just functions that from c
and the third one is from objective-c
.
However,
I was required to test some files that have to be hosted under a HTTPS server. Although at the end of the day, I used Azure to deploy a simple webservice, but the process to create a local HTTPS server is still interesting enough to let me write it down.
There are two things you need to keep in mind before u keep doing this:
openssl
to create a certificate, it is not a trusted certificate, I don't know if this will fulfil your need of HTTPS or not.sudo
, make sure you are admin of your machine{ | |
"resultCount":50, | |
"results":[ | |
{ | |
"wrapperType":"track", | |
"kind":"song", | |
"artistId":909253, | |
"collectionId":879273552, | |
"trackId":879273565, | |
"artistName":"Jack Johnson", |
iverilog can be download using homebrew.
$ brew install icarus-verilog
GTKWave can be downloaded here:
http://gtkwave.sourceforge.net/
To See Waveform in macOS for VHDL
#iOSBySheldon #AutoLayout
This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.
This time I will bring you some tricks directly from Apple’s document regarding the ways to debug / detecting ambiguous warning (
“There are a few methods you can call to help identify ambiguous layouts. All of these methods should be used only for debugging. Set a breakpoint somewhere where you can access the view hierarchy, and then call one of the following methods fr
This is some notes written by Sheldon. I mainly focused on iOS programming but I also do JAVA and C# backend, you can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.
High order functions with lambda
is very easy in Swift
(see article Here) but not that easy in languages like Objective-C
or C++
. In JAVA
we can do it but since JAVA
has too many versions, there are a lot different ways to do it, and there is always a better one you can choose.
Assuming we have a class like:
class Student {
private int age;