                 column = 0      // The number of columns is 0
             }
             
-            let currentRect = CGRect(x: (CGFloat((page-1)) * frame.width) + (CGFloat(column) * EmojiWidth),
-                                     y: CGFloat(row) * EmojiHeight,
-                                     width: EmojiWidth,
-                                     height: EmojiHeight)
+            let currentRect = CGRect(x: (CGFloat((page-1)) * frame.width) + (CGFloat(column) * EmojiSize.width),
+                                     y: CGFloat(row) * EmojiSize.height,
+                                     width: EmojiSize.width,
+                                     height: EmojiSize.height)
             
             if (row == (rowNum - 1) && column == (colNum - 1)) {
                 // last position of page, add delete button

    
    func setupUI() {
        
        let rowNum: Int = Int(frame.height / EmojiHeight)
        let colNum: Int = Int(frame.width / EmojiWidth)
        let numOfPage: Int = Int(ceil(CGFloat(emojis.count) / CGFloat((rowNum * colNum))))
        
        guard rowNum != 0 && colNum != 0 else {


public class ISEmojiView: UIView, UIScrollViewDelegate {
    
    let EmojiSize = CGSize(width: 50, height: 50)
    let EmojiFontSize = CGFloat(32.0)
    
    var scrollView: UIScrollView = {
