I have the following code:
\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{floatrow}
%\usepackage{caption}
\usepackage{subcaption}
%\usepackage{subfig}
\usepackage{float}
\begin{document}
\noindent
Cross-referencing test: Figure \ref{figure}
\noindent
The figure is \ref{figure_1} and not 1 (a). \\
The figure is \ref{figure_2} and not 1 (b).
\begin{figure}[!ht]
\centering
\begin{subfigure}{0.5\textwidth}
\includegraphics[width=\textwidth]{img/tex.png}
\caption{Caption 1}
\label{figure_1}
\end{subfigure}%
%\qquad
%add desired spacing between images, e. g. ~, \quad, \qquad etc.
%(or a blank line to force the subfigure onto a new line)
\begin{subfigure}{0.5\textwidth}
\centering
\includegraphics[width=\textwidth]{img/tex.png}
\caption{Caption 2}
\label{figure_2}
\end{subfigure}
\caption{Caption of the figure}\label{figure}
\end{figure}
\end{document}
At the moment, if I cross-reference the subfigures in the text, they appear as follows: 1.a and 1.b. How do I make the cross-references appear as follows: 1 (a) and 1 (b)?

figure 1bbecomefigure 2 (a)? Or you just want the parentheses? If the latter is the case, then this is what you are looking for. – Phelype Oleinik Feb 08 '18 at 14:28