SpotlightLyrics is an open-source library which helps developers in parsing & displaying LRC files, it is completely developed under Swift 4.2 and designed for both iPhone and iPad platforms.

Getting Started


pod 'SpotlightLyrics'


  • Download or clone the repository and then compile it to obtain SpotlightLyrics.framework,
  • Copy SpotlightLyrics.framework from frameworks folder to the your project,
  • Open your project in XCode and navigate to General - Linked Frameworks and Libraries to add the component into you project

How To Use

To start using SpotlightLyrics in your files, just do the following:

import SpotlightLyrics


If you only parse LRC files, you can use the class LyricsParser, here's an example for it:

import SpotlightLyrics

// ... Load the LRC string from local or remote

// Pass your lyrics string to create an instance
let parser = LyricsParser(lyrics: lyricsString)

// Now you get everything about the lyrics

for lyric in parser.lyrics {


SpotlightLyrics provids an LRC displaying component for showing lyrics and scrolling like most of the music apps do:

import SpotlightLyrics

// ... Load the LRC string from local or remote

// Create an instance and add it to your UI
let lyricsView = LyricsView()
lyricsView.frame = self.view.bounds

// Pass the LRC string and style the LyricsView
lyricsView.lyrics = lyricsString
lyricsView.font = UIFont.systemFont(ofSize: 13)
lyricsView.textColor =
lyricsView.highlightedFont = UIFont.systemFont(ofSize: 13)
lyricsView.highlightedTextColor = UIColor.lightGray

// Play

// Pause

// Seek to an eplased time 20.0)

// Start it over 0)

Also, please check the Demo


LyricsView supports the following properties to allow you to make it up.

Property Name Type Default Value Description
lyricTextColor UIColor LightGray The color of the unhighlighted lyrics
lyricHighlightedTextColor UIColor Black The color of the highlighted lyrics
lyricFont UIFont System 16 The font of the unhighlighted lyrics
lyricHighlightedFont UIFont System 16 Bold The font color of the highlighted lyrics
lineSpacing CGFloat 16 The spacing of each lyric lines

Objective-C compatibility

This respository hasn't been tested under Objective-C environment in any way.